Skip to content

Commit cb492fa

Browse files
authored
Merge branch 'main' into history-propagation
2 parents 68ebe76 + f5a2fe8 commit cb492fa

40 files changed

Lines changed: 324 additions & 989 deletions

File tree

.github/workflows/build-push-to-main.yaml

Lines changed: 0 additions & 122 deletions
This file was deleted.

.github/workflows/build-tag.yaml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ jobs:
1919
uses: astral-sh/setup-uv@v7
2020
- name: Install dependencies
2121
run: uv sync --frozen --all-packages --group dev
22+
- name: Verify tag matches a stable VERSION
23+
if: startsWith(github.ref, 'refs/tags/v')
24+
run: |
25+
uv run python -c "
26+
import os
27+
from importlib.metadata import version
28+
tag = os.environ['GITHUB_REF'].removeprefix('refs/tags/v')
29+
package_version = version('dapr')
30+
assert tag == package_version, (
31+
f'Tag {os.environ[\"GITHUB_REF\"]!r} expects version={tag!r}, got {package_version!r}. '
32+
'Bump VERSION before tagging, see RELEASE.md'
33+
)
34+
assert '.dev' not in package_version, (
35+
f'Version {package_version!r} contains .dev. Release tags must point to a stable or rc version'
36+
)
37+
"
2238
- name: Run Autoformatter
2339
run: |
2440
uv run ruff check --fix && uv run ruff format
@@ -76,47 +92,47 @@ jobs:
7692
env:
7793
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
7894
run: |
79-
python -m build
95+
python -m build --wheel
8096
twine upload dist/*
8197
- name: Build and publish dapr-ext-workflow
8298
env:
8399
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
84100
run: |
85101
cd ext/dapr-ext-workflow
86-
python -m build
102+
python -m build --wheel
87103
twine upload dist/*
88104
- name: Build and publish Dapr Flask Extension
89105
env:
90106
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
91107
run: |
92108
cd ext/flask_dapr
93-
python -m build
109+
python -m build --wheel
94110
twine upload dist/*
95111
- name: Build and publish dapr-ext-grpc
96112
env:
97113
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
98114
run: |
99115
cd ext/dapr-ext-grpc
100-
python -m build
116+
python -m build --wheel
101117
twine upload dist/*
102118
- name: Build and publish dapr-ext-fastapi
103119
env:
104120
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
105121
run: |
106122
cd ext/dapr-ext-fastapi
107-
python -m build
123+
python -m build --wheel
108124
twine upload dist/*
109125
- name: Build and publish dapr-ext-langgraph
110126
env:
111127
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
112128
run: |
113129
cd ext/dapr-ext-langgraph
114-
python -m build
130+
python -m build --wheel
115131
twine upload dist/*
116132
- name: Build and publish dapr-ext-strands
117133
env:
118134
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
119135
run: |
120136
cd ext/dapr-ext-strands
121-
python -m build
137+
python -m build --wheel
122138
twine upload dist/*

.github/workflows/build.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: dapr-python
33
on:
44
push:
55
branches:
6+
- main
67
- feature/*
78
pull_request:
89
branches:
@@ -36,6 +37,16 @@ jobs:
3637
echo "Source files are not formatted correctly. Run 'uv run ruff check --fix && uv run ruff format'."
3738
exit 1
3839
fi
40+
- name: Verify main is on a .dev version
41+
if: github.ref == 'refs/heads/main' || github.base_ref == 'main'
42+
run: |
43+
uv run python -c "
44+
from importlib.metadata import version
45+
package_version = version('dapr')
46+
assert '.dev' in package_version, (
47+
f'main version must contain .dev (got {package_version!r}); see RELEASE.md'
48+
)
49+
"
3950
4051
build:
4152
needs: lint

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,24 @@ pip3 install dapr-ext-grpc
4949
pip3 install dapr-ext-fastapi
5050
```
5151

52-
* Development package
52+
* In-development version
53+
54+
Only tagged releases are published to PyPI. To install the in-development
55+
version (the current state of `main`), point pip at the GitHub repository:
5356

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

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

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

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

6771
### Try out examples
6872

RELEASE.md

Lines changed: 26 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -34,44 +34,31 @@ release-X.Y ●──●────●───●───●───●
3434
3535
first commit on release-X.Y:
3636
- versions (prev).dev → X.Y.0rc0
37-
- dapr deps >=(prev).dev → >=X.Y.0rc0
3837
simultaneously on main:
3938
- versions (prev).dev → X.Y.0.dev
40-
- dapr deps >=(prev).dev → >=X.Y.0.dev
4139
```
4240

43-
## Version files
41+
Only tag pushes (`v*`) publish to PyPI. Pushes to `main` and release branches
42+
do not publish anything.
4443

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

48-
**Version files** (set `__version__`):
49-
- `dapr/version/version.py`
50-
- `ext/dapr-ext-workflow/dapr/ext/workflow/version.py`
51-
- `ext/dapr-ext-grpc/dapr/ext/grpc/version.py`
52-
- `ext/dapr-ext-fastapi/dapr/ext/fastapi/version.py`
53-
- `ext/dapr-ext-langgraph/dapr/ext/langgraph/version.py`
54-
- `ext/dapr-ext-strands/dapr/ext/strands/version.py`
55-
- `ext/flask_dapr/flask_dapr/version.py`
47+
## Version file
5648

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

6552
## Version string conventions
6653

67-
| Stage | `__version__` example | dep lower bound example |
68-
|---|---|---|
69-
| Development (always on `main`) | `1.17.0.dev` | `dapr >= 1.17.0.dev` |
70-
| First RC (on `release-X.Y`) | `1.17.0rc0` | `dapr >= 1.17.0rc0` |
71-
| Subsequent RCs (on `release-X.Y`) | `1.17.0rc1`, `1.17.0rc2`, … | `dapr >= 1.17.0rc1` |
72-
| Stable release | `1.17.0` | `dapr >= 1.17.0` |
73-
| Patch release candidate | `1.17.1rc1` | `dapr >= 1.17.1rc1` |
74-
| Stable patch release | `1.17.1` | `dapr >= 1.17.1` |
54+
| Stage | `VERSION` example |
55+
| ---------------------------------- | ----------------------------- |
56+
| Development (always on `main`) | `1.18.0.dev` |
57+
| First RC (on `release-X.Y`) | `1.18.0rc0` |
58+
| Subsequent RCs (on `release-X.Y`) | `1.18.0rc1`, `1.18.0rc2`, … |
59+
| Stable release | `1.18.0` |
60+
| Patch release candidate | `1.18.1rc1` |
61+
| Stable patch release | `1.18.1` |
7562

7663
## Remote convention
7764

@@ -92,19 +79,15 @@ git checkout -b release-X.Y
9279
git push upstream release-X.Y
9380
```
9481

95-
### 2. Bump versions on the release branch (first commit)
82+
### 2. Bump VERSION on the release branch (first commit)
9683

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

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

102-
### 3. Bump versions on `main` (second commit)
103-
104-
Open a PR targeting `main` to align it with the new release version:
105-
106-
- In all seven version files: change the previous dev version to `X.Y.0.dev`
107-
- In all six extension `setup.cfg` files: change the previous `dapr >= ...dev` to `dapr >= X.Y.0.dev`
89+
Open a PR targeting `main` that changes `VERSION` from the previous dev version to
90+
`X.Y.0.dev`.
10891

10992
### 4. Push the tag
11093

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

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

128-
### 1. Bump versions on the release branch
111+
### 1. Bump VERSION on the release branch
129112

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

135115
### 2. Push the tag
136116

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

151-
### 1. Bump versions on the release branch
152-
153-
Open a PR **targeting `release-X.Y`** that does:
131+
### 1. Bump VERSION on the release branch
154132

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

158136
### 2. Push the tag
159137

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.18.0.dev

0 commit comments

Comments
 (0)