Repository navigation
feat(queue): [develop] add pluggable queue API - #7790
somethingwithproof wants to merge 2 commits into
Conversation
c34316a to
09537b3
Compare
618cbab to
52c52dc
Compare
52c52dc to
c80ad9a
Compare
1a4646d to
57e92e6
Compare
912ba8e to
fd626c9
Compare
|
Force-pushed a rebase onto develop. This branch had picked up six commits that belong to my fork rather than here: the GitHub Actions rewrite (which deleted I also dropped The two real conflicts were in Composer. develop moved symfony to With the fork workflows gone, three upstream checks ran against this branch for the first time and needed fixes:
|
|
Reviewed head 74f9769 and submitted follow-up commit efa8a80 to this branch through the GitHub Git API after Git transport stalled. Its tree matches the locally tested commit. Fixed: malformed stored metadata escaped the dead-letter boundary. Payload decoding was caught, but metadata decoding and correlation-stamp validation happened afterward. A corrupt metadata blob therefore threw from Fixed: the queue E2E fixture selected unsupported PHP 8.2. This branch requires PHP ^8.3. The Compose build now selects PHP 8.3, and verification documentation matches the current workflow and report output. Validation: 51 queue unit/integration tests (170 assertions) passed on mise-selected PHP 8.5.11 against a disposable MySQL 8.4.11 container. Composer validation, actionlint for the queue workflow, and repository commit hooks passed. Dependencies were installed from this branch's lock with scripts/plugins disabled. The complete producer/worker Compose E2E suite and coverage percentage were not measured in this review. The original PR exposed no CI checks; the pushed patch still needs upstream CI. |
|
Resolved the merge conflicts with develop at f54da33 and pushed merge commit 2999e02. The Composer lock retains the queue dependencies and develop's dependency changes. Composer regenerated lock metadata without resolving new package versions. Repository guidance retains both the shared-tooling section and develop's new instructions. Both original histories and the malformed-metadata fix are retained. The installer CLI helpers now check for an argument before reading it; this fixes the three pre-existing errors that blocked the full PHPStan commit check. Validation: 37 queue unit tests passed on mise-selected PHP 8.5.11; Composer validation and a clean locked installation passed; full PHPStan reported no errors; commit guards, PHP lint, formatting, and static-analysis hooks passed. The database integration suite was not rerun for this dependency/guidance merge. Updated upstream CI still needs to complete. |
|
Resolved the conflict with current develop and pushed merge commit 3977e24 without rewriting branch history. Kept the current Weblate-managed Swedish catalog exactly as upstream instead of overwriting newer translations with older incidental edits from the queue branch. Composer's merged lockfile validates strictly and installs cleanly; all 37 queue unit tests and 3 browser-isolation contracts pass. Full PHPStan reports no errors, PHP CS Fixer changes zero files, and commit guards pass. GitHub will rerun the database transport and queue E2E checks. |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved correctness, dependency, localization, and service-privilege issues remain.
8 open findings
Queue worker systemd service runs as root · New Missing queue translation strings in POT template · New Queue stamp metadata lost on non-database transports · New Production function stubs defined in test file · New Odd percent sequences bypass translation parameter validation · New Duplicate alcatron contributor entry and README row · New Duplicate alcatron contributor configuration entry · New Documented PHP minimum conflicts with composer requirement · New
🧠 Review effort: Lite
|
Addressed the open review findings. Queue API tests now pass 55 cases / 184 assertions with 100% line coverage on PHP 8.3. The Docker test confirms two concurrent workers handle distinct messages. The full unit suite, PHPStan and required commit checks pass. An alternating five-round local benchmark measured serialization round trips at 14.86 µs before and 17.19 µs after; the additional work preserves broker delivery policy that was previously lost. This is a serializer diagnostic, not worker or database throughput. Keeping the PR in draft for the documented use-case and delivery-semantics discussion. |
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
78bd410 to
530d41d
Compare
3485999 to
a2757eb
Compare
a2757eb to
88e3e92
Compare
Adds a durable queue API built on Symfony Messenger with a database transport, CLI worker and admin entry points, queue settings, and a systemd unit for the worker. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
|






This change adds an opt-in queue API so future Cacti features can hand work to background workers. It includes a database-backed queue, explicit message contracts, routing, leases, retries and administrative commands, with an extension point for provider plugins. This establishes reusable background-work infrastructure; it does not move existing operations onto queues or include the example external-broker integrations.
What this adds
This PR adds a Cacti queue API for durable asynchronous work. Producers publish through stable Cacti functions, handlers are registered by message type, and workers process jobs outside browser requests.
The API provides:
Queue systems
The database transport is included. Provider plugins can connect named queues to:
With suitable provider plugins, an installation could route
notificationsto RabbitMQ,pollerwork to SQS, andreportsto the built-in database queue. Provider-specific packages and credentials are managed by their provider plugins; those external integrations are not included in this PR.Operational behavior
The worker and admin CLIs are guarded against web execution. Failed deliveries are retried according to Cacti policy and then moved to a dead-letter state. Workers use reservation tokens and expiring leases so stale workers cannot acknowledge or modify another worker's delivery.
This is dormant infrastructure: it does not migrate existing foreground operations to queues in this PR.
Validation
tests/e2e/queue/.Release targeting
developCloses #7856
Shares the Symfony Messenger, UID and OptionsResolver requirements with #8012. Existing locked versions are retained except aligning OptionsResolver to 7.4.8.
Release notes are consolidated in #8320. Review and merge this child before that final documentation PR.
Discussion hold
Keep this PR in draft until the maintainer discussion is complete. Agree on the first concrete queue use case, worker operations, delivery semantics and ownership before merging.
Merge order: #8012 first. Both PRs edit composer.json and composer.lock; after #8012 lands, rebase this PR and regenerate only its entries with
composer update symfony/messenger symfony/uid --with-dependencies --no-install.Assigned GitHub milestone: v1.3.0.
Revision and checks
Description scope: target
develop, 36 changed files, head754d91352. Checked 2026-10-23 03:06:04 UTC.GitHub check snapshot: 2 passed. Local test figures and earlier CI runs above are recorded evidence for their stated revisions and environments; they do not assert that every check passes at this head.