Skip to content

Syncing from upstream OCA/queue (16.0)#527

Merged
bt-admin merged 16 commits intobrain-tec:16.0from
OCA:16.0
Feb 11, 2026
Merged

Syncing from upstream OCA/queue (16.0)#527
bt-admin merged 16 commits intobrain-tec:16.0from
OCA:16.0

Conversation

@bt-admin
Copy link
Copy Markdown

bt_gitbot

sbidoul and others added 16 commits January 8, 2026 12:34
This allows creating test job with a long duration for stress testing.
When a SerializationFailure occurs when updating the state of dependent
jobs, the cursor is not usable anymore so the retry failed with `current transaction is aborted`. A savepoint fixes that.
In this commit we cleanly separate the job acquisition (i.e. verifying the job is in the exepected state, marking it started and locking it) from job execution.

We also avoid trying to start the job if it is already locked by using SKIP LOCKED
and exiting early. Indeed in such situations the job is likely already being handled by another worker so there is no point trying to start it, so we exit early
and let it be handled either by the other worker or the dead job requeuer.
Extract the logic to run one job out of the /queue_job/runjob route.
Towards making this logic reusable in other job executors.
Since we are not going to delete records nor modify foreign keys,
we can take a weaker lock.
…rts patches

Otherwise monkey-patches could be added twice when instantiating new test classes.
Signed-off-by sbidoul
@bt-admin bt-admin added the 16.0 label Feb 11, 2026
@bt-admin bt-admin merged commit 9a1ef7e into brain-tec:16.0 Feb 11, 2026
4 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 79.64602% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.82%. Comparing base (545c5bc) to head (9f5bf99).
⚠️ Report is 102 commits behind head on 16.0.

Files with missing lines Patch % Lines
queue_job/controllers/main.py 47.50% 20 Missing and 1 partial ⚠️
queue_job/models/queue_job.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             16.0     #527      +/-   ##
==========================================
+ Coverage   85.56%   85.82%   +0.26%     
==========================================
  Files          87       88       +1     
  Lines        4739     4798      +59     
  Branches      411      414       +3     
==========================================
+ Hits         4055     4118      +63     
+ Misses        598      592       -6     
- Partials       86       88       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants