There is something in the path from python-jenkins to jenkins itself that is limiting the amount of data that can be passed. The result is visible when passing multiple source packages. The following is an example of what is visible from the jenkins log:
++ echo '{"status":' '"Not' 'started",' '"bug_id":' null, '"updated":' '"Wed,' 5 Mar 2014 17:12:49 '+0000",' '"current_workflow_step":' '"Queued",' '"description":' '"two",' '"created":' '"Wed,' 5 Mar 2014 17:12:30 '+0000",' '"series":' '"saucy",' '"subticket":' '[{"status":' '"New",' '"current_workflow_step":' '"New",' '"artifact":' '[{"resource_uri":' '"/api/v1/fullsubticketartifact/9/",' '"type":' '"SPU",' '"id":' 9, '"reference":' '"https://swift.canonistack.canonical.com/v1/AUTH_a1412d7034ce49b2a980b84b15c04372/ticket-2//home/fginther/work/engine/ppa-test/lintian4python/lintian4python_0.24.4ubuntu1~fginther.20140305.1_source.changes",' '"name":' '"lintian4python_0.24.4ubuntu1~fginther.20140305.1_source.changes"},' '{"resource_uri":' '"/api/v1/fullsubticketartifact/8/",' '"type":' '"SPU",' '"id":' 8, '"reference":' '"https://swift.canonistack.canonical.com/v1/AUTH_a1412d7034ce49b2a980b84b15c04372/ticket-2//home/fginther/work/engine/ppa-test/lintian4python/lintian4python_0.24.4ubuntu1~fginther.20140305.1.tar.gz",' '"name":' '"lintian4python_0.24.4ubuntu1~fginther.20140305.1.tar.gz"},' '{"resource_uri":' '"/api/v1/fullsubticketartifact/7/",' '"type":' '"SPU",' '"id":' 7, '"reference":' '"https://swift.canonistack.canonical.com/v1/AUTH_a1412d7034ce49b2a980b84b15c04372/ticket-2//home/fginther/work/engine/ppa-test/lintian4python/lintian4python_0.24.4ubuntu1~fginther.20140305.1.dsc",' '"name":' '"lintian4python_0.24.4ubuntu1~fginther.20140305.1.dsc"}],' '"assignee":' '"fginther",' '"source_package_upload":' '{"version":' '"0.24.4ubuntu1~fginther.20140305.1",' '"sourcepackage":' '{"resource_uri":' '"/api/v1/sourcepackage/1/",' '"id":' 1, '"name":' '"lintian4python"},' '"id":' 3, '"resource_uri":' '"/api/v1/spu/3/"},' '"id":' 3, '"resource_uri":' '"/api/v1/fullsubticket/3/"},' '{"status":' '"New",' '"current_workflow_step":' '"New",' '"artifact":' '[{"resource_uri":' '"/api/v1/fullsubticketartifact/6/",' '"type":' '"SPU",' '"id":' 6, '"reference":' '"https://swift.canonistack.canonical.com/v1/AUTH_a1412d7034ce49b2a980b84b15c04372/ticket-2//home/fginther/work/engine/ppa-test/autopkgtest/autopkgtest_2.3.7ubuntu1~fginther.20140305.1_source.changes",' '"name":' '"autopkgtest_2.3.7ubuntu1~fginther.20140305.1_source.changes"},' '{"resource_uri":' '"/api/v1/fullsubticketartifact/5/",' '"type":' '"SPU",' '"id":' 5, '"reference":' '"https://swift.canonistack.canonical.com/v1/AUTH_a1412d7034ce49b2a980b84b15c04372/ticket-2//home/fginther/work/engine/ppa-test/autopkgtest/autopkgtest_2.3.7ubuntu1~fginther.20140305.1.tar.gz",' '"name":' '"autopkgtest_2.3.7ubuntu1~fginther.20140305.1.tar.gz"},' '{"resource_uri":' '"/api/v1/fullsubticketartifact/4/",' '"type":' '"SPU",' '"id":' 4, '"reference":' '"https://swift.canonistack.canonical.com/v1/AUTH_a1412d7034ce49b2a980b84b15c04372/ticket-2//home/fginther/work/engine/ppa-test/autopkgtest/autopkgtest_2.3.7ubuntu1~fginther.20140305.1.dsc",' '"name":' '"autopkgtest_2.3.7ubuntu1~fginther.20140305.1.dsc"}],' '"assignee":' '"fginther",' '"source_package_upload":' '{"version":' '"2.3.7ubuntu1~fginther.20140305.1",' '"sourcepackage":' '{"resource_uri":' '"/api/v1/sourcepackage/2/",' '"id":' 2, '"name":' '"autopkgtest"},' '"id":' 2, '"re'
It then creates this backtrace:
+ /srv/lander_jenkins_sub/lander/bin/lander_merge_parameters.py --result-file params.json --service master --output-file all.json
Traceback (most recent call last):
File "/srv/lander_jenkins_sub/lander/bin/lander_merge_parameters.py", line 56, in <module>
main()
File "/srv/lander_jenkins_sub/lander/bin/lander_merge_parameters.py", line 48, in main
data[args.service] = json.loads(result_file.read())
File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Invalid control character at: line 9 column 3008 (char 3288)
The problem only appears to be when passing data from the lander worker to jenkins (which uses python-jenkins). The simple fix for this is to only pass the ticket id, then use the ticket sytem 'getfullticket' interface to actually get the ticket contents.