Bug 1187976

Summary: fedwatch error from msg/stats/files with "/" in string
Product: [Fedora] Fedora Reporter: Pete Travis <me>
Component: python-dpathAssignee: Stanislav Ochotnicky <sochotni>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: sochotni
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-dpath-1.4.0-1.fc23 python-dpath-1.4.0-1.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-09 20:55:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
simple fedwatch.conf
none
debug-friendly fedwatch.d script none

Description Pete Travis 2015-02-01 03:45:49 UTC
Created attachment 986602 [details]
simple fedwatch.conf

eceived SIGTERM. Closing shop
fedwatch.service: main process exited, code=exited, status=1/FAILURE
Unit fedwatch.service entered failed state.
fedwatch.service failed.
fedwatch - ERROR - runtime exception: en-US/boot_arguments.xml at msg/commit/stats/files contains the separator /
Traceback (most recent call last):
  File "/usr/bin/fedwatch", line 101, in <module>
    fw.watch()
  File "/usr/lib/python2.7/site-packages/fedwatch.py", line 127, in watch
    path, val = dpath.util.search(msg, parg, yielded=True).next()
  File "/usr/lib/python2.7/site-packages/dpath/util.py", line 84, in _search_yielded
    for path in _inner_search(obj, glob.lstrip(separator).split(separator), separator, dirs=dirs):
  File "/usr/lib/python2.7/site-packages/dpath/util.py", line 99, in _inner_search
    for path in dpath.path.paths(obj, dirs, leaves, skip=True, separator = separator):
  File "/usr/lib/python2.7/site-packages/dpath/path.py", line 100, in paths
    for child in paths(v, dirs, leaves, newpath, skip, separator=separator):
  File "/usr/lib/python2.7/site-packages/dpath/path.py", line 100, in paths
    for child in paths(v, dirs, leaves, newpath, skip, separator=separator):
  File "/usr/lib/python2.7/site-packages/dpath/path.py", line 100, in paths
    for child in paths(v, dirs, leaves, newpath, skip, separator=separator):
  File "/usr/lib/python2.7/site-packages/dpath/path.py", line 100, in paths
    for child in paths(v, dirs, leaves, newpath, skip, separator=separator):
  File "/usr/lib/python2.7/site-packages/dpath/path.py", line 97, in paths
    validate(newpath, separator=separator)
  File "/usr/lib/python2.7/site-packages/dpath/path.py", line 57, in validate
    separator))
InvalidKeyName: en-US/boot_arguments.xml at msg/commit/stats/files contains the separator /

I've attached the fedwatch.conf and fedwatch.d/ files I've been working on, although /msg/stats/files isn't being used and the fedwatch.d/ is not executed because of this error.

Comment 1 Pete Travis 2015-02-01 03:47:31 UTC
Created attachment 986603 [details]
debug-friendly fedwatch.d script

Comment 3 Stanislav Ochotnicky 2015-02-02 15:33:11 UTC
Hmm, this kinda sucks... I used dpath to turn json messages into simple xpath-like expression so that it is easily configurable. However that '/' in "en-US/TODO.xml" screws it up because if we did:
..stats/files/en-US/TODO.xml
it would not be able to tell if we are talking about the node "en-US/TODO.xml" or node en-US, subnode TODO.xml

Honestly not sure how to make this work without it being too hacky...

Comment 4 Pete Travis 2015-02-02 21:54:24 UTC
Yeah, I can imagine that trying to actually care about the content of message strings would get unmaintainable quickly :)  The problem seems to be noted upstream, sort of, https://github.com/akesterson/dpath-python/issues/30

Comment 5 Pete Travis 2015-02-03 01:23:21 UTC
PR sent for something that's arguably too hacky, but did get the job done for similar commits.

Comment 6 Stanislav Ochotnicky 2015-10-21 10:51:52 UTC
Better late than never I guess. I'll update python-dpath to 1.4.0 which should fix this issue

Comment 7 Fedora Update System 2015-10-21 11:13:56 UTC
python-dpath-1.4.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-996035bbe0

Comment 8 Fedora Update System 2015-10-24 12:10:08 UTC
python-dpath-1.4.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update python-dpath'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-996035bbe0

Comment 9 Fedora Update System 2015-10-26 18:30:19 UTC
python-dpath-1.4.0-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update python-dpath'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-f439275a56

Comment 10 Fedora End Of Life 2015-11-04 16:00:51 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Fedora Update System 2016-02-09 20:55:27 UTC
python-dpath-1.4.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2016-02-10 10:52:18 UTC
python-dpath-1.4.0-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.