Cron errors not being fed to sentry?
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
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:
- logging.exception fails to reach sentry
- having silenced the ping errors in sentry (https://sentry.io/organizations/online/issues/2034184415) leads to all JSONDecodeError being ignored
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from odoo/runbot
-
mergebot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
mergebot
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
mergebot
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
mergebot
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
mergebot
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100