Merge lp://staging/~ursinha/ubuntu-ci-services-itself/cli-check-changes-file into lp://staging/ubuntu-ci-services-itself

Proposed by Ursula Junque
Status: Merged
Approved by: Chris Johnston
Approved revision: 253
Merged at revision: 250
Proposed branch: lp://staging/~ursinha/ubuntu-ci-services-itself/cli-check-changes-file
Merge into: lp://staging/ubuntu-ci-services-itself
Diff against target: 244 lines (+138/-6)
6 files modified
cli/ci_libs/file_handler.py (+13/-2)
cli/tests/data/foobar_0.1-1_dsc.changes (+19/-0)
cli/tests/data/foobar_0.1-1_random.changes (+8/-0)
cli/tests/test_cli.py (+69/-2)
cli/tests/test_file_handler.py (+14/-1)
cli/ubuntu-ci (+15/-1)
To merge this branch: bzr merge lp://staging/~ursinha/ubuntu-ci-services-itself/cli-check-changes-file
Reviewer Review Type Date Requested Status
Chris Johnston (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+207059@code.staging.launchpad.net

Commit message

Adds validation to the cli's source package files extension (.changes), also adds better error handling in case the file is named .changes but it's not valid

Description of the change

As pointed by ev this morning, it's possible to provide any kind of source package upload files to the cli, not only .changes, and this makes the cli break horribly.
This branch adds a check if the provided file has the extension .changes, and if not, aborts. Also it adds better exception handling in case the file has a .changes extension but it's not a valid file.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:251
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/172/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/172/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:253
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/173/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/173/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:253
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/187/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/187/rebuild

review: Approve (continuous-integration)
Revision history for this message
Chris Johnston (cjohnston) :
review: Approve
Revision history for this message
Chris Johnston (cjohnston) wrote :
Download full text (114.5 KiB)

The attempt to merge lp:~ursinha/ubuntu-ci-services-itself/cli-check-changes-file into lp:ubuntu-ci-services-itself failed. Below is the output from the failed tests.

New python executable in /tmp/tmp.PdKySJq1fJ/bin/python
Installing distribute.............................................................................................................................................................................................done.
Installing pip...............done.
== Testing ci-utils ....
Downloading/unpacking python-swiftclient==1.8.0
  Running setup.py egg_info for package python-swiftclient

    Installed /tmp/tmp.PdKySJq1fJ/build/python-swiftclient/pbr-0.6-py2.7.egg
    [pbr] Processing SOURCES.txt
    warning: LocalManifestMaker: standard file '-c' not found

    warning: no previously-included files found matching '.gitignore'
    warning: no previously-included files found matching '.gitreview'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no files found matching '*' under directory 'tools'
Downloading/unpacking simplejson>=2.0.9 (from python-swiftclient==1.8.0)
  Running setup.py egg_info for package simplejson

Installing collected packages: python-swiftclient, simplejson
  Running setup.py install for python-swiftclient
    [pbr] Reusing existing SOURCES.txt
    changing mode of build/scripts-2.7/swift from 664 to 775
    changing mode of /tmp/tmp.PdKySJq1fJ/bin/swift to 775
  Running setup.py install for simplejson
    building 'simplejson._speedups' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c simplejson/_speedups.c -o build/temp.linux-x86_64-2.7/simplejson/_speedups.o
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/simplejson/_speedups.o -o build/lib.linux-x86_64-2.7/simplejson/_speedups.so

Successfully installed python-swiftclient simplejson
Cleaning up...
Downloading/unpacking python-glanceclient==0.12.0
  Running setup.py egg_info for package python-glanceclient

    Installed /tmp/tmp.PdKySJq1fJ/build/python-glanceclient/pbr-0.6-py2.7.egg
    [pbr] Excluding argparse: Python 2.6 only dependency
    [pbr] Processing SOURCES.txt
    warning: LocalManifestMaker: standard file '-c' not found

    warning: no previously-included files found matching '.gitignore'
    warning: no previously-included files found matching '.gitreview'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files found matching '.gitignore'
    warning: no previously-included files found matching '.gitreview'
Downloading/unpacking pbr>=0.5.21,<1.0 (from python-glanceclient==0.12.0)
  Running setup.py egg_info for package pbr
    [pbr] Processing SOURCES.txt
    warning: LocalManifestMaker: standard file '-c' not found

    warning: no previously-included files found matching '.gitignore'
    warning: no previously-included files found matching '.gitreview'
    warning: no previously-included files matching '*.pyc' found anywhere in d...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches