Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ ui/test-results
ui/playwright-report
dw/server/ui
dw/docs
dw/examples
workflows/*/assets
14 changes: 14 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ A PyPI install gets released `diffusers`, which may lag the newest pipelines; in

GitHub generates notes from commits at tag time. The sections below are the hand-written notes: the newest is drafted at release prep and pasted into the GitHub release body once the tag has published (`gh release edit v<version> --notes-file ...`). Items a branch's author wants the next note to name go in a new section at the top.

### 0.23.1

<!-- Drafted at release prep (2026-11-28). Paste into the GitHub release body once the tag has published: gh release edit v0.23.1 --notes-file ... -->

A packaging fix for 0.23.0. The engine, server and UI are unchanged.

- **The Docker image builds again.** 0.23.0 published no image:
`scripts/build_dist.sh` listed the example catalog with git, which the
image's build stage does not have. `dkackman/diffusers-workflow:0.23.1`
and `latest` are the first images of the 0.23 line.
- The `.mcpb` packer's lockfile holds `tmp` at 0.2.7, past two path
advisories in 0.0.33. `tmp` is a build-time dependency of the packer and
is in nothing dw ships.

### 0.23.0

<!-- Drafted from v0.22.0..develop at release prep (2026-11-28), with the feat/installer branch notes folded in. Paste into the GitHub release body once the tag has published: gh release edit v0.23.0 --notes-file ... -->
Expand Down
21 changes: 4 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"description": "Build-time tools only: the pinned .mcpb packer that scripts/build_mcpb.py runs",
"devDependencies": {
"@anthropic-ai/mcpb": "2.1.2"
},
"overrides": {
"tmp": "0.2.7"
}
}
14 changes: 13 additions & 1 deletion scripts/build_dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,19 @@ cp docs/*.md dw/docs/
# tracked files go in: workflows/*/assets/ holds generated media (gitignored).
rm -rf dw/examples
mkdir -p dw/examples
git ls-files -z -- workflows prompts loras | while IFS= read -r -d '' f; do
# A checkout copies what git tracks. The Docker build has no .git and no git
# (docker/Dockerfile's wheel stage), and its context is already a clean tree
# (.dockerignore), so there every file under the three folders is copied,
# bar the generated media git ignores (workflows/*/assets/)
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
list_examples() { git ls-files -z -- workflows prompts loras; }
else
list_examples() {
find workflows prompts loras -type f \
-not -path 'workflows/*/assets/*' -print0
}
fi
list_examples | while IFS= read -r -d '' f; do
mkdir -p "dw/examples/$(dirname "$f")"
cp "$f" "dw/examples/$f"
done
Expand Down
35 changes: 35 additions & 0 deletions tests/test_serve_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,41 @@ def test_build_dist_copies_the_tracked_catalog_into_the_package(tmp_path):
assert "dw/examples/" in (repo / ".gitignore").read_text().splitlines()


def test_build_dist_copies_the_catalog_where_there_is_no_git(tmp_path):
"""The Docker wheel stage has no .git and no git (v0.23.0's image failed
to build on `git: command not found`): the step copies the three trees
from the files themselves, and still leaves generated media out."""
import re
import shutil
import subprocess
from pathlib import Path

repo = Path(__file__).resolve().parents[1]
script = (repo / "scripts" / "build_dist.sh").read_text()
step = re.search(r"^rm -rf dw/examples\n.*?^done\n", script, re.S | re.M)
assert step, "build_dist.sh lost its dw/examples step"
for tree in ("workflows/t/a.json", "prompts/p.json", "loras/l.json"):
(tmp_path / tree).parent.mkdir(parents=True, exist_ok=True)
(tmp_path / tree).write_text("{}")
(tmp_path / "workflows/t/assets").mkdir()
(tmp_path / "workflows/t/assets/big.mp4").write_text("media")
# A PATH holding only what the step needs, so `git` is not found
bin_dir = tmp_path / "bin"
bin_dir.mkdir()
for tool in ("bash", "rm", "mkdir", "cp", "find", "dirname"):
(bin_dir / tool).symlink_to(shutil.which(tool))
subprocess.run(
[str(bin_dir / "bash"), "-euo", "pipefail", "-c", step.group(0)],
cwd=tmp_path,
check=True,
env={"PATH": str(bin_dir)},
)
examples = tmp_path / "dw" / "examples"
assert sorted(
str(p.relative_to(examples)) for p in examples.rglob("*") if p.is_file()
) == ["loras/l.json", "prompts/p.json", "workflows/t/a.json"]


def _run_with_uvicorn_interrupted(serve, monkeypatch, restart_code):
"""dw.serve.main when uvicorn.run ends in the KeyboardInterrupt that a
SIGINT leaves behind, with a restart asked for (or not)."""
Expand Down