mozilla-services / mozilla-services/updatebot
Detect mercurial errors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
It appears that the error from Bug 1916544 actually wasn't breaking things; however it was spitting out this error into stderr and not causing any warnings/error from Updatebot (presumably because the command was not erroring):
[Debug] (CommandProvider xsimd job_id=549) ----------------------------------------------
[task 2024-09-02T18:11:54.074Z] [Info] (CommandProvider xsimd job_id=549) Running ['hg', 'checkout', '-C', '.']
[task 2024-09-02T18:11:56.845Z] [Info] (CommandProvider xsimd job_id=549) Return: 0 Runtime (s): 2
[task 2024-09-02T18:11:56.845Z] [Debug] (CommandProvider xsimd job_id=549) -------
[task 2024-09-02T18:11:56.845Z] [Debug] (CommandProvider xsimd job_id=549) stdout:
[task 2024-09-02T18:11:56.845Z] [Debug] (CommandProvider xsimd job_id=549) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
[task 2024-09-02T18:11:56.845Z]
[task 2024-09-02T18:11:56.845Z] [Debug] (CommandProvider xsimd job_id=549) -------
[task 2024-09-02T18:11:56.845Z] [Debug] (CommandProvider xsimd job_id=549) stderr:
[task 2024-09-02T18:11:56.845Z] [Debug] (CommandProvider xsimd job_id=549) Traceback (most recent call last):
[task 2024-09-02T18:11:56.845Z] File "/usr/lib/python3/dist-packages/mercurial/extensions.py", line 255, in _runuisetup
[task 2024-09-02T18:11:56.845Z] uisetup(ui)
[task 2024-09-02T18:11:56.845Z] File "/builds/worker/.mozbuild/evolve/hgext3rd/evolve/exthelper.py", line 149, in finaluisetup
[task 2024-09-02T18:11:56.845Z] c(ui)
[task 2024-09-02T18:11:56.845Z] File "/builds/worker/.mozbuild/evolve/hgext3rd/evolve/headchecking.py", line 28, in uisetup
[task 2024-09-02T18:11:56.845Z] code = scmutil.filteredhash.__code__
[task 2024-09-02T18:11:56.845Z] ^^^^^^^^^^^^^^^^^^^^
[task 2024-09-02T18:11:56.845Z] AttributeError: module 'mercurial.scmutil' has no attribute 'filteredhash'
[task 2024-09-02T18:11:56.845Z] *** failed to set up extension evolve: module 'mercurial.scmutil' has no attribute 'filteredhash'
[task 2024-09-02T18:11:56.845Z]
[task 2024-09-02T18:11:56.845Z] [Debug] (CommandProvider xsimd job_id=549) ----------------------------------------------
We should automatically look at stderr output and detect if there is a traceback in it, and if so, log an exception to sentry (but not abort execution).
Contributor guide
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.
Research direction
Start by tracing the command execution path that produces the shown stderr from the issue body. Check how stderr is currently captured and logged; done means traceback-containing Mercurial stderr produces a Sentry exception without aborting the command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100