Skip to content

Upgrade Ruff to 0.16.0 and restore Workers CI - #2

Merged
adewale merged 2 commits into
mainfrom
agent/upgrade-ruff-0.16
Oct 9, 2026
Merged

adewale merged 2 commits into
mainfrom
agent/upgrade-ruff-0.16

Conversation

@adewale

@adewale adewale commented Jul 26, 2026 •

Copy link
Copy Markdown
Owner

What and why

Adopt Ruff 0.16.0 and restore the existing Linux Workers integration suite. The failing integrations also fail without the Ruff changes: dependency and Workers runtime drift prevented the original examples from starting.

Changes

  • Pin Ruff and ruff-pre-commit to 0.16.0, apply its default-rule fixes, and run Ruff in CI.
  • Remove typing-only webtypy from runtime dependencies. Pin workers-py to 1.17.7 and CI's uv to 0.12.3; explicitly use Python 3.13.
  • Import the FastAPI app inside the request handler. Current FastAPI telemetry needs randomness unavailable during Worker startup; routes and responses are unchanged.
  • Remove D1's unused AI binding, which otherwise requests Cloudflare credentials in local development.
  • Enable python_workflows, now required for the Python workflow API, and verify the DAG reaches complete rather than merely returning JSON.
  • Use isolated temporary Worker storage (including D1 initialization) and terminate the entire dev-server process group between tests.
  • Allow cold dependency downloads for every example in CI and fail promptly if a server exits before becoming ready.

Validation

  • Linux Docker, Python 3.13, workers-py 1.17.7, Wrangler 4.149.0: uv run pytest -vv -s — 8 passed, 1 xfailed, 1 xpassed.
  • uv run ruff check . and staged diff whitespace checks pass.
  • Before the fixes, the integration suite reproduced Worker setup/HTTP failures; after the fixes, FastAPI, D1, Durable Objects, Cron and a complete Workflow all pass.
  • The existing Workers AI expected failure remains. The LangChain XPASS is an existing placeholder test, not proof of a working LangChain integration. No production deployment was performed.

Risk

Moderate: this updates the Worker development toolchain across the examples. The live HTTP integrations exercise the changed runtime paths; GitHub's clean Linux CI run is the final merge gate.

@adewale adewale changed the title Upgrade Ruff to 0.16.0 Upgrade Ruff to 0.16.0 and restore Workers CI Oct 9, 2026
@adewale
adewale marked this pull request as ready for review October 9, 2026 10:41
@adewale
adewale merged commit a3192a8 into main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant