Conversation
Summary of ChangesHello @jeremi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request undertakes a significant refactoring effort to replace the existing Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 19.0 #55 +/- ##
==========================================
- Coverage 71.31% 67.52% -3.79%
==========================================
Files 299 380 +81
Lines 23618 30117 +6499
==========================================
+ Hits 16844 20338 +3494
- Misses 6774 9779 +3005
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request successfully migrates the OpenSPP platform from the OCA queue_job module to the job_worker module. The changes are comprehensive, covering module dependencies, Docker configurations, CI/CD scripts, and application logic across multiple modules. The migration adopts a flat channel structure using the queue.limit model and leverages new features like group().on_done() for job barriers. The feedback provided focuses on ensuring consistency in the new API usage and identifying minor opportunities for robustness in the migrated code.
| # Override command to run queue job worker | ||
| command: ["odoo", "gevent", "--limit-time-real=0"] | ||
| # Run job_worker standalone runner process | ||
| command: ["python", "-m", "odoo.addons.job_worker.cli"] |
| self.with_delay( | ||
| channel="root.dci", | ||
| channel="dci", | ||
| eta=delay, | ||
| timeout=60, | ||
| description=f"DCI Retry Callback {self.transaction_id}", | ||
| )._retry_callback() |
There was a problem hiding this comment.
| ) | ||
| main_job = group(*jobs) | ||
| main_job.on_done(self.delayable(channel="root_program.cycle").mark_check_eligibility_as_done(cycle)) | ||
| main_job.on_done(self.delayable(channel="cycle").mark_check_eligibility_as_done(cycle)) |
There was a problem hiding this comment.
Replace queue_job dependency with job_worker across all spp_* modules. - Update __manifest__.py depends in 7 modules - Replace all odoo.addons.queue_job imports with job_worker - Delete queue.job.channel XML data and Python model - Add queue.limit data files for spp_area and spp_dci_server - Migrate spp_programs queue_data.xml to queue.limit records - Update test contexts from test_queue_job_no_delay to queue_job__no_delay - Update menu/action references to job_worker external IDs - Update lint scripts to whitelist job_worker model names - Update Docker and pre-commit config for job_worker
45f0b34 to
70cf079
Compare
In Odoo 19, SQL constraint violations (UNIQUE, NOT NULL) raise psycopg2.IntegrityError in tests, not ValidationError. The conversion to ValidationError only happens in the RPC service layer, not during direct ORM calls. Align with OCB's own test patterns.
The two-phase initialization for fresh starts with demo modules was still referencing queue_job. Update to job_worker to match the migration.
The local test script was missing odoo-job-worker in the addons-path, same issue that was previously fixed in the CI workflow files.
…del refs in access CSV The ir.model.access.csv files referenced detail models from spp_change_request_v2 without the module prefix, causing "No matching record found for external id" errors during fresh installation (e.g. MIS demo). Add spp_change_request_v2. prefix to all model_id:id references.
Summary
queue_jobdependency withjob_workeracross all 7 spp_* modules (spp_area, spp_dci_server, spp_demo, spp_drims, spp_gis_report, spp_programs, spp_starter_social_registry)odoo.addons.queue_jobimports withodoo.addons.job_workerqueue.job.channelXML data and thequeue_job_channel.pymodel from spp_programsqueue.limitdata files for spp_area, spp_dci_server; migrate spp_programs queue_data.xmltest_queue_job_no_delaytoqueue_job__no_delayjob_worker.*ODOO_QUEUE_JOB_CHANNELSenv var from entrypoint, docker-compose, README, and .env exampleodoo-job-workermodule and CLI workerjob_workermodels includingqueue.limitDependencies
Requires odoo-job-worker with the
group().on_done()barrier feature (feat/group-on-done-barrierbranch).Test plan
spp_programscycle/eligibility/entitlement/payment managers run jobs viagroup().on_done()correctlyspp_areaarea import jobs enqueue and executespp_dci_serverasync routes and bulk upload delay correctlyspp_demodemo data generator batches via grouppython -m odoo.addons.job_worker.cli