Cron errors not being fed to sentry?

Open
#471 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
observability

Research direction

Start with the traceback locations in forwardport/models/forwardport.py and forwardport/models/project.py, then inspect how logging.exception reaches Sentry for cron jobs. Compare the handling of this JSONDecodeError with the silenced ping errors referenced in the issue. Done means establishing why the exception is absent from Sentry and documenting or correcting that behavior.

Written by the indexing model from the issue text.

Description

mergebot

Got an error in a cron last week:

2021-03-22 17:00:00,332 29559 ERROR mergebot odoo.addons.forwardport.models.forwardport: Error while processing forwardport.batches(34198,), skipping 
Traceback (most recent call last):
  File "forwardport/models/forwardport.py", line 26, in _process
    b._process_item()
  File "/home/odoo/src/runbot/forwardport/models/forwardport.py", line 53, in _process_item
    newbatch = batch.prs._port_forward()
  File "forwardport/models/project.py", line 661, in _port_forward
    results = r.json()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This error did not appear in sentry, there are two possibilities here:

Dominant language
Python
Stars
159
Forks
156
Avg merge
1d 13h
Merged PRs (30d)
16

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from odoo/runbot

All issues in odoo/runbot

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.