Commit Graph
132 Commits
Author SHA1 Message Date
Bram 9d3d657b56 Prepare for 3.0.0 (#6961) 2026-12-01 19:18:09 +00:00
Bram 727772b03c Prepare for 2.4.3 (#6726) 2026-11-14 08:52:16 +00:00
Bram 431c823fa8 Prepare for 2.4.2 (#6679) 2026-11-11 15:22:02 +01:00
Davide Silvestri 9eabe6b06b feat(core): add Redis-backed background chat runs (#6382)
* feat(core): add Redis-backed background chat runs

Run AI work once in Celery and follow bounded Redis Streams over HTTP. Keep
lifecycle, Stop, leases and final outcomes in Postgres without per-token writes.
Include the shared frontend follower, adapter registry, recovery API, migration,
queue/deployment wiring and adapter guide. No product uses it yet.

Part of #6346

* Remove unused chat run response header exposure

* Extract shared async streaming HTTP router

* Simplify chat run follower and group engine constants

- Check read access once when a stream opens; read run state from Postgres
  only after 5 s without output or on run.finished.
- Split follow_run into small steps around _OutputReader.
- Turn event kinds, error codes and stop reasons into StrEnums; the
  Kuma-only model_unavailable code moves to Kuma.
- Document ChatRunType hooks with param, return and raises fields.
- Add BASEROW_ASGI_HTTP_MAX_CONCURRENT_STREAMS and size the follower Redis
  pool by it.
- Give handler publish/recover calls their own event loop, so cleanup
  cannot close pools shared by HTTP followers.
- Update ADR 010 and the background chat runs docs.

* Clean up chat run interfaces and test setup

* Prune chat runs once after 7 days and skip overdue claims

- Delete each expired page with one statement. Incomplete runs get one more
  ensure_interruption_warning call first, and are deleted even if it fails,
  so run metadata never accumulates. The hook now returns None.
- Keep runs for 7 days instead of 30.
- Never claim a queued run older than NOT_STARTED_AFTER; the sweeper ends it.

* Retry brief Redis failures in chat run followers

- A connection error, or a buffer that does not exist yet, is retried with
  the same cursor, sending heartbeats meanwhile.
- run.replay_unavailable is only sent once the follower stops reading, so
  the browser can treat it as final.

* Let finished chat run output expire with the active TTL

Nothing reads a buffer once its run has finished: followers return the saved
outcome first and recovery only reads running runs. Drop finish() and the
24 h TTL, so a finished buffer expires an hour after its last append.
_publish_terminal now reuses _publish.

* Run the chat run scale tests on fakeredis

Build the buffer's real read and write pools on fakeredis connections, so
these tests always run and backend CI needs no Redis service. The Kuma e2e
tests cover a real Redis.

* Address the remaining chat run review comments

- Serialize the saved outcome after the transaction, so only a failed save
  is logged as one.
- Make the primary-pin test transactional; inside the test transaction the
  router always used the primary, so it could not fail.
- Cover the race past the per-user lock, a lost run after Stop and an old
  writer appending to a recreated buffer.
- End the admission test's request with a disconnect, so a regression fails
  instead of looping.
- Document that one worker process runs AI replies one at a time.

* Move the chat run migration after develop's core 0130

* Log only the class of an outcome serialization error

* Test that the run deadline asks a run to stop

* Keep a run's status when a resumed follower rebuilds its output

* Note that slow DNS lookups turn off a run's live output
2026-10-21 14:52:59 +02:00
Bram 99e9f0a9ab Prepare for 2.4.1 (#6368) 2026-10-13 14:45:44 +00:00
Bram 8097dfc412 Prepare for 2.4.0 (#6206) 2026-09-29 20:32:59 +02:00
Peter EvansandJeremie Pardou 620fcc9a56 feature: inbound email trigger (#5730)
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-09-22 13:41:10 +01:00
Bram c9459e9328 Prepared for 2.3.4 (#6092) 2026-09-15 14:19:59 +00:00
Bram 7b52576b7f Prepare for 2.3.3 release (#5756) 2026-07-21 14:46:32 +02:00
Bram 3aa9778502 Prepare for 2.3.2 (#5723) 2026-07-15 15:01:52 +02:00
Bram 875d477dc5 Prepare for 2.3.1 (#5697) 2026-07-09 18:04:32 +02:00
Bram 982c0edc24 Prepare for 2.3.0 release (#5672) 2026-07-07 21:42:14 +02:00
Bram 04174e75fb Prepare for 2.2.2 (#5271) 2026-04-28 18:39:44 +02:00
Bram f1cdb4d536 Prepare for 2.2.1 release (#5256) 2026-04-22 21:07:50 +02:00
Bram 9a6eefa666 Prepare for 2.2.0 (#5153) 2026-04-08 21:14:14 +02:00
Bram 6725bd485e Prepare for 2.1.6 (#4977) 2026-03-13 14:47:25 +01:00
Bram 8c25ef6d60 Prepare for 2.1.5 (#4959) 2026-03-12 17:02:12 +01:00
Bram 0cd4125e47 Prepare for 2.1.4 (#4913) 2026-03-04 18:15:17 +01:00
Bram 01a1624151 Prepare for 2.1.3 (#4891) 2026-02-27 16:04:36 +01:00
Bram fed3d91ca1 Prepare for 2.1.2 (#4877) 2026-02-26 20:03:03 +01:00
Bram 489ac91b27 Prepare for 2.1.1 (#4852) 2026-02-23 16:04:30 +01:00
Bram 1a92615fe7 Prepare for 2.1.0 (#4833) 2026-02-19 22:35:32 +01:00
Petr Stříbný 4194f1e254 Close connection in postgres_ready() (#4605) 2026-01-30 13:16:02 +01:00
Davide Silvestri f161790387 chore: switch to ruff (#4387)
* Switch to ruff

* Fix flaky test

* Remove frontend-lint changes

* Fix all-in-one image creation in CI

* Update saas target

* Add changelog entry

* Fix PYTHONPATH for lint-migrations

* Run check-migrations in the CI
2026-01-16 11:34:19 +01:00
Davide Silvestri e25988ea0d chore: switch to uv and justfile (#4369)
* create backend justfile; switch to uv

* Add deploy and dc-deploy recipes to build images

* Add uv.lock for reproducible builds

* CI fixes + improvements

* Reduce build time

* improve CI caching

* Improve exit early conditions

* Set requires_python==3.11.*; add backend/media to gitignore

* Fix all-in-one Dockerfiles and some other fixes

* Introduce frontend justfile + some other useful recipes

* Fix permissions issue with dev containers

* Improve dockerfiles and docs on how to use the dev env

* Fix mjml-email-compiler service

* Update docs + address feedback

* Fix containers healthchecks

* Fix yarn test in dev container

* Minor fixes to docs and justfile attach command

* Address Petr's feedback

* Address additional feedback

* Add changelog entry

* Address feedback: Petr and Przemek

* address feedback + prepare for saas PR

* minor fixes

* Address Bram's feedback 2
2026-01-15 11:22:22 +01:00
Bram 22f9c3c0a7 Prepare for 2.0.6 (#4496) 2025-12-22 14:00:49 +01:00
Bram c1088ce21b Prepare for 2.0.5 (#4472) 2025-12-17 16:22:51 +01:00
Bram decacfbaeb Prepare for 2.0.4 (#4444) 2025-12-15 14:21:51 +01:00
Bram 6907800d00 Prepare for 2.0.3 (#4392) 2025-12-04 16:27:56 +01:00
Bram 51a7ccecc6 Prepare for 2.0.2 (#4344) 2025-11-27 13:12:54 +01:00
Bram b36a571b91 Prepare 2.0.1 (#4287) 2025-11-18 17:08:40 +01:00
Bram 87cf002b29 Prepare for 2.0.0 release (#4277) 2025-11-17 23:30:40 +01:00
Bram Wiepjes b45f6f9798 Prepare for 1.35.3 2025-10-08 13:09:28 +00:00
Bram Wiepjes 411dd0b2a6 Prepare for 1.35.2 2025-09-30 14:40:04 +00:00
Bram Wiepjes a4c95e6188 Prepare for 1.35.1 2025-09-02 19:06:37 +00:00
Bram Wiepjes 0659170b2b Prepare for 1.35.0 release 2025-08-26 20:25:08 +00:00
Bram Wiepjes af99f9fe97 Prepare for 1.34.5 2025-07-23 18:31:08 +02:00
Bram Wiepjes d0ab6eb644 Prepare for 1.34.4 2025-07-22 22:21:19 +02:00
Bram Wiepjes 23c8e03497 Prepare for 1.34.3 2025-07-22 13:40:33 +00:00
Bram Wiepjes 6784776492 Prepare for 1.34.2 2025-07-11 12:07:58 +02:00
Bram Wiepjes 0ed4ddfe04 Prepare for 1.34.1 release 2025-07-10 15:34:35 +00:00
Bram Wiepjes d383b714ff Prepare for 1.34.0 release 2025-07-09 18:12:25 +00:00
Jérémie Pardou d109762e88 Improve backend error feedbacks 2025-07-09 16:19:04 +02:00
Bram Wiepjes f4c9e4863a Fix BASEROW_OSS_ONLY flag 2025-07-01 17:50:36 +00:00
Peter Evans c89b4b1a00 Implement Automation Workflow runner 2025-06-06 16:42:53 +04:00
Bram Wiepjes 46b381d04c Prepare for 1.33.4 2025-06-03 20:46:23 +00:00
Bram Wiepjes a352296233 Prepare for 1.33.3 2025-05-19 15:50:07 +02:00
Bram Wiepjes 05631f476b Prepare for 1.33.2 2025-05-08 20:29:02 +00:00
Bram Wiepjes ef9cee56b8 Prepare for 1.33.1 2025-05-06 12:24:06 +00:00
Bram Wiepjes e0366383d7 Prepare for 1.33.0 2025-04-29 19:09:59 +00:00