Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

"no such group" error in buglink plugin #568

Closed
klibby opened this issue Jun 22, 2016 · 6 comments
Closed

"no such group" error in buglink plugin #568

klibby opened this issue Jun 22, 2016 · 6 comments

Comments

@klibby
Copy link
Contributor

klibby commented Jun 22, 2016

Rust, rustfmt, and servo have all thrown the following error (eg https://jenkins-dxr.mozilla.org/job/servo/9/console):

15:21:29 A worker failed while indexing /builds/dxr-build-env/src/servo/servo/tests/wpt/css-tests/css21_dev/html4/border-bottom-applies-to-009.htm:
15:21:29 Traceback (most recent call last):
15:21:29 File "/builds/dxr-build-env/dxr/dxr/build.py", line 572, in index_chunk
15:21:29 index_file(tree, tree_indexers, path, es, index)
15:21:29 File "/builds/dxr-build-env/dxr/dxr/build.py", line 542, in index_file
15:21:29 for chunk in bulk_chunks(docs(), docs_per_chunk=300, bytes_per_chunk=10000):
15:21:29 File "/builds/dxr-build-env/venv/local/lib/python2.7/site-packages/pyelasticsearch/utils.py", line 31, in bulk_chunks
15:21:29 for action in actions:
15:21:29 File "/builds/dxr-build-env/dxr/dxr/build.py", line 514, in docs
15:21:29 chain.from_iterable(regionses)))):
15:21:29 File "/builds/dxr-build-env/dxr/dxr/lines.py", line 472, in finished_tags
15:21:29 key=nesting_order)
15:21:29 File "/builds/dxr-build-env/dxr/dxr/lines.py", line 338, in tag_boundaries
15:21:29 for start, end, data in tags:
15:21:29 File "/builds/dxr-build-env/dxr/dxr/plugins/buglink/init.py", line 15, in refs
15:21:29 bug = m.group(1)
15:21:29 IndexError: no such group

@erikrose
Copy link
Contributor

Hmm, my initial guess is that configobj is reading #([0-9]+) as a comment, so the regex is empty, so it has no capturing groups.

@pelmers
Copy link
Contributor

pelmers commented Jun 22, 2016

d'oh, that behavior was really puzzling me...

@erikrose
Copy link
Contributor

Yep, confirmed.

@erikrose
Copy link
Contributor

Put double quotes around it, and the problem goes away.

@erikrose
Copy link
Contributor

Better still, use triple-double quotes to avoid DiffSK/configobj#97, which kicks in in some situations:

"""#([0-9]+)"""

@erikrose
Copy link
Contributor

Looks like I did document this way back when: https://dxr.readthedocs.io/en/latest/configuration.html#syntax. Too bad configobj development has stalled.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants