Bug 681871 - bkr job-submit fails when input XML file contains the xml header <?xml version="1.0" ?>
Summary: bkr job-submit fails when input XML file contains the xml header <?xml versio...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.6
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: ---
Assignee: Bill Peck
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-03 13:27 UTC by Marian Csontos
Modified: 2019-05-22 13:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-24 04:43:15 UTC


Attachments (Terms of Use)

Description Marian Csontos 2011-03-03 13:27:44 UTC
Description of problem:
'bkr job-results' correctly exports files with xml header, but 'bkr job-submit' fails to accept these as valid input.

When header is removed it works fine.

This worked fine with previous versions: either header was not present or job-submit changed.

IMO this is likely to be related to job merging which was submitted recently.

Version-Release number of selected component (if applicable):
0.6.5

How reproducible:
100%

Steps to Reproduce:
1. bkr job-results J:1 > j1.xml
2. bkr job-submit j1.xml
  
Actual results:
Traceback.

Expected results:
Successfully scheduled job.

Additional info:

Traceback:
Traceback (most recent call last):
  File "/usr/bin/bkr", line 9, in <module>
    load_entry_point('bkr.client==0.6.5', 'console_scripts', 'bkr')()
  File "/usr/lib/python2.6/site-packages/bkr/client/main.py", line 55, in main
    return parser.run()
  File "/usr/lib/python2.6/site-packages/kobo/cli.py", line 282, in run
    cmd.run(*cmd_args, **cmd_kwargs)
  File "/usr/lib/python2.6/site-packages/bkr/client/commands/cmd_job_submit.py", line 91, in run
    doc = xml.dom.minidom.parseString("<dummy>%s</dummy>" % mystring)
  File "/usr/lib64/python2.6/site-packages/_xmlplus/dom/minidom.py", line 1925, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib64/python2.6/site-packages/_xmlplus/dom/expatbuilder.py", line 942, in parseString
    return builder.parseString(string)
  File "/usr/lib64/python2.6/site-packages/_xmlplus/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 1, column 7

Comment 1 Bill Peck 2011-03-03 14:24:36 UTC
I see the issue.  I broke this with the way I implemented --combine being able to take stdin.

Comment 2 Bill Peck 2011-03-16 01:01:32 UTC
pushed to gerrit for review


Note You need to log in before you can comment on or make changes to this bug.