Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fd0ac06
refactor: mv durabletask-python into sdk
sicoyle Mar 24, 2026
ca44c94
fix: address copilot feedback
sicoyle Mar 24, 2026
6c3f4c7
fix: address more copilot feedback
sicoyle Mar 24, 2026
3ddb0e8
fix: grab latest from alberts dt pr
sicoyle Mar 25, 2026
c37697d
style: uv run ruff format
sicoyle Mar 25, 2026
f861543
Merge branch 'main' into refactor/mv-dt-here
sicoyle Mar 25, 2026
c4472ca
fix: update for build and give dt same version setup as other pkgs
sicoyle Mar 25, 2026
a9bec3f
fix: updates for build
sicoyle Mar 25, 2026
7dcf7c4
fix: update for some build issues
sicoyle Mar 25, 2026
c8dfbb2
fix: final fixes for build
sicoyle Mar 25, 2026
2ac5969
fix: updates for build
sicoyle Mar 25, 2026
21068e1
fix: final fixes for build
sicoyle Mar 25, 2026
516fbe4
fix: update for tests
sicoyle Mar 25, 2026
59fcbfb
fix: updates for test imports
sicoyle Mar 25, 2026
ed0c3fe
fix: 3.14 timing failure fix
sicoyle Mar 25, 2026
79c84e1
fix: address rest of copilot feedback
sicoyle Mar 25, 2026
7299487
fix: fixes for failures in build
sicoyle Mar 25, 2026
7fb1d02
Merge branch 'main' into refactor/mv-dt-here
sicoyle Mar 26, 2026
204759c
fix: correct port for test
sicoyle Mar 26, 2026
236f982
fix: update tox for tests
sicoyle Mar 26, 2026
1dd2527
fix(ci): pin to 1.17 as min so qs's quit failing on me
sicoyle Mar 26, 2026
943a6e6
Merge branch 'main' into refactor/mv-dt-here
sicoyle Mar 26, 2026
d64d8ee
refactor: mv dt into wf pkg
sicoyle Mar 27, 2026
b9ddffa
fix: finishing touches
sicoyle Mar 27, 2026
a6315e3
Merge branch 'main' into refactor/mv-dt-here
sicoyle Mar 27, 2026
199eb08
style: tox -e ruff
sicoyle Mar 27, 2026
f4096b1
Merge branch 'refactor/mv-dt-here' of github.com:sicoyle/python-sdk i…
sicoyle Mar 27, 2026
c683e07
Merge branch 'main' into refactor/mv-dt-here
sicoyle Mar 30, 2026
94a017d
fix: update all protos with this change and to dt-protobuf main chang…
sicoyle Mar 30, 2026
1449ff6
fix(build): updates for tests
sicoyle Mar 30, 2026
c9f7337
fix: update one last ref
sicoyle Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/build-push-to-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,10 @@ jobs:
cd ext/dapr-ext-strands
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Build and publish DurableTask Python
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd durabletask
python -m build
twine upload dist/*
8 changes: 8 additions & 0 deletions .github/workflows/build-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,11 @@ jobs:
cd ext/dapr-ext-strands
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Build and publish DurableTask Python
if: startsWith(github.ref_name, 'durabletask-v')
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd durabletask
python -m build
twine upload dist/*
21 changes: 20 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
tox -e ruff
statusResult=$(git status -u --porcelain)
if [ -z $statusResult ]
if [ -z "$statusResult" ]
then
exit 0
else
Expand Down Expand Up @@ -62,3 +62,22 @@ jobs:
tox -e py`echo "${{ matrix.python_ver }}" | sed 's/\.//g'`
- name: Upload test coverage
uses: codecov/codecov-action@v5
# Sidecar for running e2e tests requires Go SDK
- name: Install Go SDK for DurableTask Python checks
uses: actions/setup-go@v5
with:
go-version: 'stable'
# Install and run the durabletask-go sidecar for running e2e tests
- name: Pytest e2e tests for DurableTask Python
run: |
# TODO: use dapr run instead of durabletask-go as it provides a more reliable sidecar behavior for e2e tests
go install github.com/dapr/durabletask-go@main
durabletask-go --port 4001 &
pip install -e durabletask[dev]
pytest -m e2e durabletask_tests/
- name: Run examples
run: |
pip install mechanical-markdown
cd durabletask_examples
durabletask-go --port 4001 &
mm.py README.md
73 changes: 73 additions & 0 deletions .github/workflows/durabletask-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: DurableTask Python Build Validation
Comment thread
sicoyle marked this conversation as resolved.
Outdated

on:
push:
branches: [ "main" ]
tags: ["v*"]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e durabletask[dev]
- name: Lint with ruff
run: |
ruff check durabletask/ durabletask_tests/
- name: Pytest unit tests
run: |
pytest -m "not e2e" durabletask_tests/
# Sidecar for running e2e tests requires Go SDK
- name: Install Go SDK
uses: actions/setup-go@v5
with:
go-version: 'stable'
# Install and run the durabletask-go sidecar for running e2e tests
- name: Pytest e2e tests
run: |
# TODO: use dapr run instead of durabletask-go as it provides a more reliable sidecar behavior for e2e tests
go install github.com/dapr/durabletask-go@main
durabletask-go --port 4001 &
pytest -m e2e durabletask_tests/
- name: Run examples
Comment thread
sicoyle marked this conversation as resolved.
Outdated
run: |
pip install mechanical-markdown
cd durabletask_examples
durabletask-go --port 4001 &
mm.py README.md
publish:
needs: build
if: startswith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
env:
TWINE_USERNAME: "__token__"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
13 changes: 9 additions & 4 deletions .github/workflows/validate_examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,30 @@ jobs:
with:
repository: ${{ env.CHECKOUT_REPO }}
ref: ${{ env.CHECKOUT_REF }}
- name: Determine latest Dapr Runtime version (including prerelease)
- name: Determine latest Dapr Runtime version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
MIN_RUNTIME_VERSION="1.17.0"
RUNTIME_VERSION=$(curl -fsS -H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/repos/dapr/dapr/releases?per_page=10" | \
jq -r 'sort_by(.created_at) | reverse | .[0].tag_name | ltrimstr("v")')
jq -r 'map(select(.prerelease == false)) | sort_by(.created_at) | reverse | .[0].tag_name | ltrimstr("v")')
if [ -z "$RUNTIME_VERSION" ] || [ "$RUNTIME_VERSION" = "null" ]; then
echo "Failed to resolve Dapr Runtime version" && exit 1
fi
if [ "$(printf '%s\n' "$MIN_RUNTIME_VERSION" "$RUNTIME_VERSION" | sort -V | head -n1)" != "$MIN_RUNTIME_VERSION" ]; then
echo "Resolved runtime version $RUNTIME_VERSION is below minimum $MIN_RUNTIME_VERSION, using minimum instead"
RUNTIME_VERSION="$MIN_RUNTIME_VERSION"
fi
echo "DAPR_RUNTIME_VER=$RUNTIME_VERSION" >> $GITHUB_ENV
echo "Found $RUNTIME_VERSION"
- name: Determine latest Dapr CLI version (including prerelease)
- name: Determine latest Dapr CLI version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
CLI_VERSION=$(curl -fsS -H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/repos/dapr/cli/releases?per_page=10" | \
jq -r 'sort_by(.created_at) | reverse | .[0].tag_name | ltrimstr("v")')
jq -r 'map(select(.prerelease == false)) | sort_by(.created_at) | reverse | .[0].tag_name | ltrimstr("v")')
if [ -z "$CLI_VERSION" ] || [ "$CLI_VERSION" = "null" ]; then
echo "Failed to resolve Dapr CLI version" && exit 1
fi
Expand Down
37 changes: 32 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
Expand All @@ -38,19 +40,17 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Editor config
.idea
.vscode

# Translations
*.mo
*.pot
Expand All @@ -59,6 +59,7 @@ coverage.xml
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
Expand All @@ -76,11 +77,26 @@ target/
# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py
Expand All @@ -106,6 +122,17 @@ venv.bak/

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# IDEs
.idea
.vscode

coverage.lcov

# macOS specific files
.DS_Store
86 changes: 86 additions & 0 deletions durabletask/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.3.0

### New

- Added `ConcurrencyOptions` class for fine-grained concurrency control with separate limits for activities and orchestrations. The thread pool worker count can also be configured.

### Fixed

- Fixed an issue where a worker could not recover after its connection was interrupted or severed

## v0.2.1

### New

- Added `set_custom_status` orchestrator API ([#31](https://github.com/microsoft/durabletask-python/pull/31)) - contributed by [@famarting](https://github.com/famarting)
- Added `purge_orchestration` client API ([#34](https://github.com/microsoft/durabletask-python/pull/34)) - contributed by [@famarting](https://github.com/famarting)

### Changes

- Protos are compiled with gRPC 1.62.3 / protobuf 3.25.X instead of the latest release. This ensures compatibility with a wider range of grpcio versions for better compatibility with other packages / libraries ([#36](https://github.com/microsoft/durabletask-python/pull/36)) - by [@berndverst](https://github.com/berndverst)
- Http and grpc protocols and their secure variants are stripped from the host name parameter if provided. Secure mode is enabled if the protocol provided is https or grpcs ([#38](https://github.com/microsoft/durabletask-python/pull/38) - by [@berndverst)(https://github.com/berndverst)
- Improve ProtoGen by downloading proto file directly instead of using submodule ([#39](https://github.com/microsoft/durabletask-python/pull/39) - by [@berndverst](https://github.com/berndverst)

### Updates

- Updated `durabletask-protobuf` submodule reference to latest

## v0.1.1a1

### New

- Add recursive flag in terminate_orchestration to support cascade terminate ([#27](https://github.com/microsoft/durabletask-python/pull/27)) - contributed by [@shivamkm07](https://github.com/shivamkm07)

## v0.1.0

### New

- Retry policies for activities and sub-orchestrations ([#11](https://github.com/microsoft/durabletask-python/pull/11)) - contributed by [@DeepanshuA](https://github.com/DeepanshuA)

### Fixed

- Fix try/except in orchestrator functions not being handled correctly ([#21](https://github.com/microsoft/durabletask-python/pull/21)) - by [@cgillum](https://github.com/cgillum)
- Updated `durabletask-protobuf` submodule reference to latest distributed tracing commit - by [@cgillum](https://github.com/cgillum)

## v0.1.0a5

### New

- Adds support for secure channels ([#18](https://github.com/microsoft/durabletask-python/pull/18)) - contributed by [@elena-kolevska](https://github.com/elena-kolevska)

### Fixed

- Fix zero argument values sent to activities as None ([#13](https://github.com/microsoft/durabletask-python/pull/13)) - contributed by [@DeepanshuA](https://github.com/DeepanshuA)

## v0.1.0a3

### New

- Add gRPC metadata option ([#16](https://github.com/microsoft/durabletask-python/pull/16)) - contributed by [@DeepanshuA](https://github.com/DeepanshuA)

### Changes

- Removed Python 3.7 support due to EOL ([#14](https://github.com/microsoft/durabletask-python/pull/14)) - contributed by [@berndverst](https://github.com/berndverst)

## v0.1.0a2

### New

- Continue-as-new ([#9](https://github.com/microsoft/durabletask-python/pull/9))
- Support for Python 3.7+ ([#10](https://github.com/microsoft/durabletask-python/pull/10)) - contributed by [@DeepanshuA](https://github.com/DeepanshuA)

## v0.1.0a1

Initial release, which includes the following features:

- Orchestrations and activities
- Durable timers
- Sub-orchestrations
- Suspend, resume, and terminate client operations
21 changes: 21 additions & 0 deletions durabletask/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
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
Loading
Loading