Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
122 changes: 0 additions & 122 deletions .github/workflows/build-push-to-main.yaml

This file was deleted.

35 changes: 28 additions & 7 deletions .github/workflows/build-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ jobs:
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv sync --frozen --all-packages --group dev
- name: Verify version.py matches tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
uv run python -c "
import os
from dapr.version import __version__
tag_version = os.environ['GITHUB_REF'].removeprefix('refs/tags/v')
assert tag_version == __version__, (
f'Tag {os.environ[\"GITHUB_REF\"]!r} expects __version__={tag_version!r}, '
f'got {__version__!r}. Bump version files before tagging, see RELEASE.md'
)
"
- name: Verify release version is not a .dev
if: startsWith(github.ref, 'refs/tags/v')
run: |
uv run python -c "
from dapr.version import __version__
assert '.dev' not in __version__, (
f'__version__ {__version__!r} contains ".dev". Release tags must point to a stable or rc version'
)
"
- name: Run Autoformatter
run: |
uv run ruff check --fix && uv run ruff format
Expand Down Expand Up @@ -76,47 +97,47 @@ jobs:
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
python -m build
python -m build --wheel
twine upload dist/*
- name: Build and publish dapr-ext-workflow
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/dapr-ext-workflow
python -m build
python -m build --wheel
twine upload dist/*
- name: Build and publish Dapr Flask Extension
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/flask_dapr
python -m build
python -m build --wheel
twine upload dist/*
- name: Build and publish dapr-ext-grpc
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/dapr-ext-grpc
python -m build
python -m build --wheel
twine upload dist/*
- name: Build and publish dapr-ext-fastapi
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/dapr-ext-fastapi
python -m build
python -m build --wheel
twine upload dist/*
- name: Build and publish dapr-ext-langgraph
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/dapr-ext-langgraph
python -m build
python -m build --wheel
twine upload dist/*
- name: Build and publish dapr-ext-strands
env:
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
run: |
cd ext/dapr-ext-strands
python -m build
python -m build --wheel
twine upload dist/*
10 changes: 10 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: dapr-python
on:
push:
branches:
- main
- feature/*
pull_request:
branches:
Expand Down Expand Up @@ -36,6 +37,15 @@ jobs:
echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'."
exit 1
fi
- name: Verify main is on a .dev version
if: github.ref == 'refs/heads/main' || github.base_ref == 'main'
run: |
uv run python -c "
from dapr.version import __version__
assert __version__.endswith('.dev'), (
f'main __version__ must end in .dev (got {__version__!r}); see RELEASE.md'
)
"

build:
needs: lint
Expand Down
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,24 @@ pip3 install dapr-ext-grpc
pip3 install dapr-ext-fastapi
```

* Development package
* In-development version

Only tagged releases are published to PyPI. To install the in-development
version (the current state of `main`), point pip at the GitHub repository:

```sh
# Install Dapr client sdk
pip3 install dapr
# Install the latest dev build of the Dapr client sdk
pip3 install "dapr @ git+https://github.com/dapr/python-sdk.git@main"

# Install Dapr gRPC AppCallback service extension
pip3 install dapr-ext-grpc-dev
# Install the latest dev build of the gRPC AppCallback service extension
pip3 install "dapr-ext-grpc @ git+https://github.com/dapr/python-sdk.git@main#subdirectory=ext/dapr-ext-grpc"

# Install Dapr Fast Api extension for Actor
pip3 install dapr-ext-fastapi-dev
# Install the latest dev build of the FastAPI extension for Actor
pip3 install "dapr-ext-fastapi @ git+https://github.com/dapr/python-sdk.git@main#subdirectory=ext/dapr-ext-fastapi"
```

> Note: Do not install both packages.
Replace `@main` with a commit SHA or release branch (e.g. `@release-1.17`)
to pin to a specific point in history.

### Try out examples

Expand Down
74 changes: 26 additions & 48 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,44 +34,31 @@ release-X.Y ●──●────●───●───●───●
first commit on release-X.Y:
- versions (prev).dev → X.Y.0rc0
- dapr deps >=(prev).dev → >=X.Y.0rc0
simultaneously on main:
- versions (prev).dev → X.Y.0.dev
- dapr deps >=(prev).dev → >=X.Y.0.dev
```

## Version files
Only tag pushes (`v*`) publish to PyPI. Pushes to `main` and release branches
do not publish anything.

Every package in this repository has one version file and, for extensions, one `setup.cfg`
dependency line that must be kept in sync during a release.
Users who need the development builds can install from git
(see the [README](./README.md#install-dapr-python-sdk)).

**Version files** (set `__version__`):
- `dapr/version/version.py`
- `ext/dapr-ext-workflow/dapr/ext/workflow/version.py`
- `ext/dapr-ext-grpc/dapr/ext/grpc/version.py`
- `ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py`
- `ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py`
- `ext/dapr-ext-strands/dapr/ext/strands/version.py`
- `ext/flask_dapr/flask_dapr/version.py`
## Version file

**Dependency lower bounds** in extension `setup.cfg` files (each has `dapr >= <version>`):
- `ext/dapr-ext-workflow/setup.cfg`
- `ext/dapr-ext-grpc/setup.cfg`
- `ext/dapr-ext-fastapi/setup.cfg`
- `ext/dapr-ext-langgraph/setup.cfg`
- `ext/dapr-ext-strands/setup.cfg`
- `ext/flask_dapr/setup.cfg`
A single `VERSION` file at the repo root is the source of truth for all
the packages. Each package's `pyproject.toml` reads from it.

## Version string conventions

| Stage | `__version__` example | dep lower bound example |
|---|---|---|
| Development (always on `main`) | `1.17.0.dev` | `dapr >= 1.17.0.dev` |
| First RC (on `release-X.Y`) | `1.17.0rc0` | `dapr >= 1.17.0rc0` |
| Subsequent RCs (on `release-X.Y`) | `1.17.0rc1`, `1.17.0rc2`, … | `dapr >= 1.17.0rc1` |
| Stable release | `1.17.0` | `dapr >= 1.17.0` |
| Patch release candidate | `1.17.1rc1` | `dapr >= 1.17.1rc1` |
| Stable patch release | `1.17.1` | `dapr >= 1.17.1` |
| Stage | `VERSION` example |
| ---------------------------------- | ----------------------------- |
| Development (always on `main`) | `1.18.0.dev` |
| First RC (on `release-X.Y`) | `1.18.0rc0` |
| Subsequent RCs (on `release-X.Y`) | `1.18.0rc1`, `1.18.0rc2`, … |
| Stable release | `1.18.0` |
| Patch release candidate | `1.18.1rc1` |
| Stable patch release | `1.18.1` |

## Remote convention

Expand All @@ -92,19 +79,15 @@ git checkout -b release-X.Y
git push upstream release-X.Y
```

### 2. Bump versions on the release branch (first commit)
### 2. Bump VERSION on the release branch (first commit)

On the newly created `release-X.Y` branch, open a PR **targeting `release-X.Y`** that does:
On the newly created `release-X.Y` branch, open a PR **targeting `release-X.Y`** that
changes the `VERSION` file from `X.Y.0.dev` → `X.Y.0rc0`.

- In all seven version files: change `X.Y.0.dev` → `X.Y.0rc0`
- In all six extension `setup.cfg` files: change `dapr >= X.Y.0.dev` → `dapr >= X.Y.0rc0`
### 3. Bump VERSION on `main` (second commit)

### 3. Bump versions on `main` (second commit)

Open a PR targeting `main` to align it with the new release version:

- In all seven version files: change the previous dev version to `X.Y.0.dev`
- In all six extension `setup.cfg` files: change the previous `dapr >= ...dev` to `dapr >= X.Y.0.dev`
Open a PR targeting `main` that changes `VERSION` from the previous dev version to
`X.Y.0.dev`.

### 4. Push the tag

Expand All @@ -125,12 +108,9 @@ all packages to PyPI.

Perform this when you want to publish `X.Y.0rcN` (N ≥ 1) from an existing `release-X.Y` branch.

### 1. Bump versions on the release branch
### 1. Bump VERSION on the release branch

Open a PR **targeting `release-X.Y`** that does:

- In all seven version files: change `X.Y.0rc(N-1)` → `X.Y.0rcN`
- In all six extension `setup.cfg` files: change `dapr >= X.Y.0rc(N-1)` → `dapr >= X.Y.0rcN`
Open a PR **targeting `release-X.Y`** that changes `VERSION` from `X.Y.0rc(N-1)` → `X.Y.0rcN`.

### 2. Push the tag

Expand All @@ -148,12 +128,10 @@ git tag vX.Y.0rcN && git push upstream vX.Y.0rcN
Perform this when `release-X.Y` is ready to ship a stable version — whether that is the
initial `X.Y.0` or a patch release (`X.Y.1`, `X.Y.2`, …).

### 1. Bump versions on the release branch

Open a PR **targeting `release-X.Y`** that does:
### 1. Bump VERSION on the release branch

- In all seven version files: change `X.Y.ZrcN` → `X.Y.Z` (drop the `rcN` suffix)
- In all six extension `setup.cfg` files: change `dapr >= X.Y.ZrcN` → `dapr >= X.Y.Z`
Open a PR **targeting `release-X.Y`** that drops the `rcN` suffix in `VERSION`:
`X.Y.ZrcN` → `X.Y.Z`.

### 2. Push the tag

Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.18.0.dev
2 changes: 1 addition & 1 deletion dapr/clients/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __init__(self, err: RpcError):
self._err_message = err.details()
self._details = StatusDetails()

self._grpc_status = rpc_status.from_call(err)
self._grpc_status = rpc_status.from_call(err) # type: ignore[arg-type]
self._parse_details()

def _parse_details(self):
Expand Down
Loading
Loading