release: cut v0.2.19 (PRP-34 batch parallel execution)#292
Conversation
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.5 to 4.36.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@9e0d7b8...7211b7c) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.36.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
chore(repo): back-merge main into dev after v0.2.18 release (#287)
…hub/codeql-action-4.36.0 ci: bump github/codeql-action from 4.35.5 to 4.36.0
chore(repo): refresh uv.lock to v0.2.18 (#239)
Activate the three forward-compat columns PRP-33 shipped on `batch_job`
(`max_parallel`, `running_items`, `cancelled_items`) by routing
`BatchService.submit` through a new `app/features/batch/runner.py` — a
single `asyncio.Semaphore(effective_parallel)` inside an
`asyncio.TaskGroup` with per-child `AsyncSession`s and cooperative
cancellation via a per-batch `asyncio.Event` + tracked `Task` refs. No
new Alembic migration (the three columns already exist).
`DELETE /batch/{batch_id}` cancels what hasn't started and bounds the
drain of what has — 200 settled / 404 missing / 409 terminal / 504
drain-timeout (RFC 7807 via the new `GatewayTimeoutError`). The frontend
`visualize/batch.tsx` gains a max-parallel `Slider`, live `running_items`
+ `parallel` chips, and a "Cancel batch" `AlertDialog`. The settings
defaults are `BATCH_GLOBAL_MAX_PARALLEL=4`,
`BATCH_CANCEL_DRAIN_TIMEOUT_SECONDS=30`.
`BatchSubmitResponse.effective_max_parallel` is a `@computed_field`
resolved from `result_summary["effective_max_parallel"]` (legacy rows
return 0) — JSONB-only, no schema migration.
Six review-driven cleanups, behaviour preserved: - runner.py: helpers now accept the per-child AsyncSession instead of the session_maker; one session opened at the top of _child, reused for every state-transition write (each helper still commits its own UPDATE so the running_items counter is observable to concurrent DELETE handlers). - runner.py: clarifying comment on the `except TimeoutError:` branch in await_drain — `asyncio.TimeoutError` has been aliased to the built-in since Python 3.11 (PEP 678 / asyncio docs); the project pins >= 3.12. - frontend/src/components/ui/slider.tsx: switched from the bundled `radix-ui` package to per-component `@radix-ui/react-slider` to match the project's existing shadcn primitives (alert-dialog, dialog, etc.). - app/features/batch/models.py + routes.py: TERMINAL_BATCH_STATES is now derived from VALID_BATCH_TRANSITIONS (a status with no out-edges is terminal) and exported from the models module — routes.py imports it instead of redeclaring the set. - frontend/src/types/api.ts: exports TERMINAL_BATCH_STATES so batch.tsx (and any future consumer) reads from the single source of truth. - test_routes_cancel.py: added test_delete_200_clean_drain covering the documented 200 happy-path. - Typo: test_cancel_running_child_propagates_cancellederror → test_cancel_running_child_propagates_cancelled_error (PRP doc updated).
feat(batch,ui): activate max_parallel + cooperative cancellation (PRP-34)
There was a problem hiding this comment.
Sorry @w7-mgfcode, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR implements PRP-34 — Batch Parallel Execution, transitioning from serial batch execution to bounded-concurrency async processing with cooperative cancellation. The implementation adds a new ChangesBatch Parallel Execution (PRP-34)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
asyncio.Semaphore+TaskGrouprunner with cooperative cancellation. NewDELETE /batch/{batch_id}endpoint (200/404/409/504),BatchSubmitResponse.effective_max_parallelcomputed-field, slider UX + Cancel AlertDialog onvisualize/batch.tsx. No Alembic migration — activates the three forward-compat columns PRP-33 shipped onbatch_job.github/codeql-action4.35.5 → 4.36.0 (PR ci: bump github/codeql-action from 4.35.5 to 4.36.0 #286).Pre-1.0 SemVer (
feat:→ PATCH perrelease-please-config.json) — release-please will open a Release PR onmainbumping to v0.2.19.Test plan
36fff6e(CI + Schema Validation both success)gh pr merge --merge— seedocs/_base/RUNBOOKS.md→ "release-please skipped the bump after a dev → main merge")chore(main): release 0.2.19PR onmainv0.2.19main → devwith--merge(not squash)Summary by CodeRabbit
Release Notes
New Features
Improvements