Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4706e1f
Cleanups
TkTech Oct 27, 2025
31dcf46
useJob should periodically refresh if the job isn't finished.
TkTech Oct 28, 2025
30aad70
Add workflow metric visualization.
TkTech Oct 28, 2025
eae7c26
Switch to umami for doc site analytics.
TkTech Oct 28, 2025
58d0540
Respect CLI flags for API plugin configuration
alfawal Dec 11, 2025
31cc61d
Merge pull request #68 from alfawal/respect-explicit-cli-flags
TkTech Dec 30, 2025
1f23377
Hacky attempt at django-tasks support.
TkTech Jan 30, 2026
afed624
Merge remote-tracking branch 'origin/26_ux' into 26_ux
TkTech Jan 30, 2026
128b5ce
UUID-Everywhere
TkTech Feb 1, 2026
dba83b0
Prepare for an upcoming 3.16 deprecation in the asyncio module.
TkTech Feb 2, 2026
8c49f34
The Mac OS CI/CD runners are very unreliable, 5x the very tight timin…
TkTech Feb 2, 2026
aa52319
Cover async executor in the regression test as well, since it also su…
TkTech Feb 2, 2026
4ac836f
Collapse regression test into old, flawed test. Try to improve perfor…
TkTech Feb 2, 2026
49fb81c
Parallelize the test runners, and fix a constraint missing a table pr…
TkTech Feb 2, 2026
91c03e0
Skip process cancellation on Windows (no signals)
TkTech Feb 3, 2026
dbf4c54
Merge pull request #85 from TkTech/finish_uuid_transition
TkTech Feb 3, 2026
ec536e2
Fix an (unlikely) issue with tasks being added to a TaskManager while…
TkTech May 24, 2026
5c2b7ab
Semi-recoverable _maintains_* functions (#88). Still generally recomm…
TkTech May 24, 2026
c9bfe78
Always cancel_all() when shutting down the Worker, even on a timeout.
TkTech May 24, 2026
c19f568
Frontend dep pinning for tests and 7-day wait on updates.
TkTech May 24, 2026
ea44e76
Fix a race where the cancellation for a task can arrive in between th…
TkTech May 24, 2026
524665f
Worker NOTIFY test is flakey on the (very) slow CI/CD workers. Give i…
TkTech May 24, 2026
005f323
Whoop, forgot the actual .npmrc that enforces 7-day delays and no-scr…
TkTech May 24, 2026
d61c705
Start updating the changelog for v0.26.
TkTech Jun 23, 2026
1ea4d6b
Remove some TypeScript build artifacts.
TkTech Jun 23, 2026
40ff640
Fix an un-importable path on exceptions in the django task integratio…
TkTech Jun 23, 2026
94d7b7a
Make a copy of TASKS["default"]["OPTIONS"] so we don't accidentally m…
TkTech Jun 23, 2026
2adda22
NPM supply chain hardening.
TkTech Jun 23, 2026
0e0d846
Minor Node dependency updates
TkTech Jun 23, 2026
7715dd7
Simpler shutdown logic. Small behavior change where signal handlers a…
TkTech Jun 24, 2026
5f01e09
Fix the leader constraint migration in v7 so the check is safer when …
TkTech Jun 24, 2026
e700b54
Use setup-node in CI instead of updating npm directly to prevent perm…
TkTech Jun 24, 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
56 changes: 52 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ jobs:
- name: Install uv
run: pip install uv

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
cache-dependency-path: chancy/plugins/api/ui/package-lock.json

- name: Installing dependencies (Node)
working-directory: chancy/plugins/api/ui
run: npm install
run: npm ci

- name: Building UI
working-directory: chancy/plugins/api/ui
Expand Down Expand Up @@ -61,7 +68,7 @@ jobs:
name: "${{ matrix.os }} - Py${{ matrix.python-version }} - PG${{ matrix.pg }}"
needs: [build]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
timeout-minutes: 60
if: github.event_name == 'pull_request'
strategy:
fail-fast: true
Expand Down Expand Up @@ -96,9 +103,13 @@ jobs:
- name: Installing dependencies (Python)
run: uv sync --all-extras

- name: Running tests
- name: Running tests (parallel)
run: |
uv run pytest -n auto -v --cov=chancy --cov-report=xml

- name: Running Django ORM tests (sequential)
run: |
uv run pytest -s -v --cov=chancy --cov-report=xml
uv run pytest tests/contrib/django/test_models.py -v --cov=chancy --cov-report=xml --cov-append

- name: Uploading coverage
uses: codecov/codecov-action@v4
Expand All @@ -110,6 +121,43 @@ jobs:
verbose: true
slug: TkTech/chancy

test-django6:
name: "Django 6 Tests (Ubuntu, Py3.12)"
needs: [build]
runs-on: ubuntu-24.04
timeout-minutes: 30
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v4.1.6

- uses: ikalnytskyi/action-setup-postgres@v8
with:
username: postgres
password: localtest
database: postgres
port: 8190
postgres-version: "18"
id: postgres

- name: Set up Python 3.12
uses: actions/setup-python@v6.0.0
with:
python-version: "3.12"

- name: Installing uv
run: pip install uv

- name: Installing dependencies (Python)
run: uv sync --all-extras

- name: Installing Django 6
run: uv pip install 'django>=6.0'

- name: Running Django Tasks tests
run: |
uv run pytest tests/contrib/django/ -s -v

docs:
name: Building Documentation
needs: [build]
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,7 @@ cython_debug/
chancy/plugins/api/ui/node_modules
# rollup-visualizer output
chancy/plugins/api/ui/stats.html
# TypeScript incremental build cache
chancy/plugins/api/ui/*.tsbuildinfo
# uv
uv.lock
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,35 @@ repos:
- id: ruff-check
args: [ --fix ]
- id: ruff-format


# UI: ESLint (Flat config) with autofix
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.9.0
hooks:
- id: eslint
name: ESLint (UI)
files: ^chancy/plugins/api/ui/.*\.(ts|tsx|js|jsx)$
args:
- "-c"
- "chancy/plugins/api/ui/eslint.config.js"
- "--max-warnings=0"
- "--fix"
additional_dependencies:
- "eslint@9.9.0"
- "@eslint/js@9.9.0"
- "typescript-eslint@8.0.1"
- "eslint-plugin-react-hooks@5.1.0-rc.0"
- "eslint-plugin-react-refresh@0.4.9"
- "globals@15.9.0"
- "typescript@5.5.3"

# UI: TypeScript type-check on pre-push
- repo: local
hooks:
- id: ts-typecheck-ui
name: TypeScript type-check (UI)
language: system
entry: bash -lc 'npm --prefix chancy/plugins/api/ui exec -s tsc -- --noEmit'
pass_filenames: false
stages: [pre-push]
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
Changelog
=========

0.26.0
------

✨ Improvements

- Reworked the dashboard, much more informative for operational insights,
light/dark themes.
- Added much, much better composable filtering widgets to both jobs and
workflows.
- Added a visualization of your upcoming (and past) cron schedule, making it
easy to identify overloaded periods.
- Added a realtime view of the internal Chancy communication traffic, helping
to debug and identify pain points (like using `push()` in a loop instead of
a single `push_many()`).
- HTTP API now supports mutation - create queues on the fly, move jobs around,
retry workflows, etc...
- HTTP API is now stable, with documentation still a work in progress.
- HTTP API now includes an unauthenticated endpoint for health checks, meant
for docker/containers (#54).
- Added dozens of new metrics, including metrics on workflows.
- The starlette app can now be created without being started for advanced use
cases, and the mounting prefix for the SPA can be changed (@jklaise, #64).
- Workflow performance has been significantly improved and can now handle
many, individual workflows with thousands of jobs without issue.
- Can now be used as a django-tasks backend, albeit with less functionality
than using Chancy directly.

🐛 Fixes

- Respect CLI flags for API plugin configuration by @alfawal (#68).

0.25.1
------

Expand Down
19 changes: 19 additions & 0 deletions chancy/cli/worker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import secrets

import click
from click.core import ParameterSource

from chancy import Chancy, Worker
from chancy.cli import run_async_command
Expand Down Expand Up @@ -84,6 +85,11 @@ async def web_command(
async with chancy:
worker = Worker(chancy, tags=set())

# Add infrastructure tasks needed for hub events (LISTEN/NOTIFY)
# and job updates, without running full queue processing.
worker.manager.add("notifications", worker._maintain_notifications())
worker.manager.add("updates", worker._maintain_updates())

# The metrics plugin needs to be running to pull in cluster-wide
# metrics.
if metrics := chancy.plugins.get("chancy.metrics"):
Expand All @@ -106,6 +112,19 @@ async def web_command(
f"No username or password was provided for the API, defaulting"
f" to 'admin' with a random password: {auth.users['admin']}"
)
else:
# Override API plugin settings only if CLI flags were explicitly provided
if ctx.get_parameter_source("host") != ParameterSource.DEFAULT:
api.host = host
if ctx.get_parameter_source("port") != ParameterSource.DEFAULT:
api.port = port
if ctx.get_parameter_source("debug") != ParameterSource.DEFAULT:
api.debug = debug
if (
ctx.get_parameter_source("allow_origin")
!= ParameterSource.DEFAULT
):
api.allow_origins = allow_origin

worker.manager.add("api", api.run(worker, chancy))
await worker.wait_for_shutdown()
10 changes: 8 additions & 2 deletions chancy/contrib/django/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ async def login(
username=username, password=password
)
if user is not None and user.is_superuser:
request.session["username"] = username
try:
request.session["username"] = username
except Exception:
pass
return True
return False

async def logout(self, request: Request) -> None:
request.session.pop("username", None)
try:
request.session.pop("username", None)
except Exception:
pass

async def authenticate(
self, conn: HTTPConnection
Expand Down
Loading
Loading