Merge lp:~vila/uci-engine/delete-data-store into lp:uci-engine
- delete-data-store
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | 868 |
Merged at revision: | 866 |
Proposed branch: | lp:~vila/uci-engine/delete-data-store |
Merge into: | lp:uci-engine |
Diff against target: |
100 lines (+29/-7) 5 files modified
britney_proxy/britney/process_results.py (+2/-2) britney_proxy/britney/tests/test_process_results.py (+3/-0) ci-utils/ci_utils/testing/fixtures.py (+2/-1) ci-utils/ci_utils/tests/test_fixtures.py (+10/-1) coverage-retriever/coverageretriever/tests/__init__.py (+12/-3) |
To merge this branch: | bzr merge lp:~vila/uci-engine/delete-data-store |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Francis Ginther | Approve | ||
Review via email: mp+239899@code.launchpad.net |
Commit message
Fix test runner swift container leak for britney
Description of the change
For britney, the test runner swift container can be deleted once it has been processed.
This will keep the swift namespace clean for britney.
This may also avoid bringing swift down when I need to clean up these containers manually ;)
PS Jenkins bot (ps-jenkins) wrote : | # |
Ubuntu CI Bot (uci-bot) wrote : | # |
The attempt to merge lp:~vila/uci-engine/delete-data-store into lp:uci-engine failed. Below is the output from the failed tests.
Running cm...
Updating source dependencies...
Updating source dependencies...
Updating source dependencies...
Updating source dependencies...
Updating source dependencies...
Updating source dependencies...
uploading webui-content.tgz to swift
Updating source dependencies...
Checking juju status
Private PPAs: disabled
Preparing local branch upload...
Uploading local branch, fingerprint cc4da5d8efeeb21
Building charm: lander
Building charm: wsgi-app
Building charm: rabbitmq-worker
Building charm: chroot-builder
Building charm: key-secret-
Building charm: webui
Building charm: system-image-server
Installing keys from bzr+ssh:
Running juju-deployer -v -c /tmp/tmpHA6iVz/
Tests running...
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
Vincent Ladeuil (vila) wrote : | # |
/me sighs
=======
FAIL: tests.test_
-------
Traceback (most recent call last):
File "/tmp/tarmac/
'Updated via CLI', ticket['title'])
File "/usr/lib/
assertion_
File "/usr/lib/
raise self.failureExc
AssertionError: 'Updated via CLI' != u'Created via CLI'
=======
FAIL: tests.test_
-------
Traceback (most recent call last):
File "/tmp/tarmac/
ticket_id = self.create_
File "/tmp/tarmac/
0, proc.returncode, '{} failed:
File "/usr/lib/
assertion_
File "/usr/lib/
raise self.failureExc
AssertionError: ('python', '/tmp/tarmac/
Ubuntu CI Bot (uci-bot) wrote : | # |
The attempt to merge lp:~vila/uci-engine/delete-data-store into lp:uci-engine failed. Below is the output from the failed tests.
Running cm...
Updating source dependencies...
Updating source dependencies...
Updating source dependencies...
Updating source dependencies...
Updating source dependencies...
Updating source dependencies...
uploading webui-content.tgz to swift
Updating source dependencies...
Checking juju status
Private PPAs: disabled
Preparing local branch upload...
Uploading local branch, fingerprint bf5030beded28fe
Building charm: lander
Building charm: wsgi-app
Building charm: rabbitmq-worker
Building charm: chroot-builder
Building charm: key-secret-
Building charm: webui
Building charm: system-image-server
Installing keys from bzr+ssh:
Running juju-deployer -v -c /tmp/tmpu81q07/
Tests running...
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
ci-utils.
Vincent Ladeuil (vila) wrote : | # |
=======
FAIL: tests.test_
-------
Traceback (most recent call last):
File "/tmp/tarmac/
ticket_id = self.create_
File "/tmp/tarmac/
0, proc.returncode, '{} failed:
File "/usr/lib/
assertion_
File "/usr/lib/
raise self.failureExc
AssertionError: ('python', '/tmp/tarmac/
ubuntu-ci ERROR SPU remote processing error: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="/
Reason: <strong>Error reading from remote server<
<hr>
<address>
</body></html>
gpg: Signature made Thu 17 Jul 2014 07:46:56 PM GMT using RSA key ID 2ABEFCDB
gpg: Good signature from "Foo Bar Test <email address hidden>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 52DC 2178 A5EC ADD2 F213 DD84 D9A2 A831 2ABE FCDB
Ran 780 tests in 509.864s
FAILED (failures=1)
Ubuntu CI Bot (uci-bot) wrote : | # |
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:867
http://
Executed test runs:
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:868
http://
Executed test runs:
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:868
http://
Executed test runs:
Click here to trigger a rebuild:
http://
Ubuntu CI Bot (uci-bot) wrote : | # |
The attempt to merge lp:~vila/uci-engine/delete-data-store into lp:uci-engine failed. Below is the output from the failed tests.
INFO:root:Creating a virtualenv to run under...
INFO:root:Asked to set the env to the virtualenv at /dev/shm/
ERROR:root:ci-utils setup failed (with code 1):
ERROR:root:
ERROR:root: failed
ERROR:root:Branched 26 revisions.
ERROR:root:
ERROR:root: Running setup.py (path:/
ERROR:root:
ERROR:root: warning: no previously-included files matching '*' found under directory 'docs/_build'
ERROR:root: warning: no previously-included files matching '*.pyc' found under directory 'tests'
ERROR:root: warning: no previously-included files matching '*.pyo' found under directory 'tests'
ERROR:root:
ERROR:root: Running setup.py install for Babel
ERROR:root:
ERROR:root: warning: no previously-included files matching '*' found under directory 'docs/_build'
ERROR:root: warning: no previously-included files matching '*.pyc' found under directory 'tests'
ERROR:root: warning: no previously-included files matching '*.pyo' found under directory 'tests'
ERROR:root: Installing pybabel script to /dev/shm/
ERROR:root:
ERROR:root:Cleaning up...
ERROR:root:
ERROR:root: Running setup.py (path:/
ERROR:root: [pbr] Processing SOURCES.txt
ERROR:root: warning: LocalManifestMaker: standard file '-c' not found
ERROR:root:
ERROR:root: warning: no previously-included files found matching '.gitignore'
ERROR:root: warning: no previously-included files found matching '.gitreview'
ERROR:root: warning: no previously-included files matching '*.pyc' found anywhere in distribution
ERROR:root: warning: no previously-included files found matching '.gitignore'
ERROR:root: warning: no previously-included files found matching '.gitreview'
ERROR:root: warning: no previously-included files matching '*.pyc' found anywhere in distribution
ERROR:root:
ERROR:root: Running setup.py install for pbr
ERROR:root: [pbr] Reusing existing SOURCES.txt
ERROR:root: error: [Errno 28] No space left on device
ERROR:root: Complete output from command /dev/shm/
Ubuntu CI Bot (uci-bot) wrote : | # |
The attempt to merge lp:~vila/uci-engine/delete-data-store into lp:uci-engine failed. Below is the output from the failed tests.
INFO:root:Creating a virtualenv to run under...
INFO:root:Asked to set the env to the virtualenv at /dev/shm/
INFO:root:
INFO:root:
key_read: uudecode AAAAB3NzaC1yc2E
failed
Traceback (most recent call last):
File "bin/called-
sys.
File "bin/called-
if not bootstrap() or deploy.main() != 0:
File "/tmp/tarmac/
setup()
File "/tmp/tarmac/
check_
File "/tmp/tarmac/
os.environ[key] = _get_net_id()
File "/tmp/tarmac/
networks = neutron.
File "/dev/shm/
ret = self.function(
File "/dev/shm/
**_params)
File "/dev/shm/
for r in self._paginatio
File "/dev/shm/
res = self.get(path, params=params)
File "/dev/shm/
headers=
File "/dev/shm/
raise exceptions.
neutronclient.
Preview Diff
1 | === modified file 'britney_proxy/britney/process_results.py' |
2 | --- britney_proxy/britney/process_results.py 2014-10-14 16:23:55 +0000 |
3 | +++ britney_proxy/britney/process_results.py 2014-10-29 13:55:51 +0000 |
4 | @@ -119,8 +119,8 @@ |
5 | # generic name here. |
6 | 'uci-testbed') |
7 | self.copy_artifact('{}.log'.format(package)) |
8 | - # FIXME: We could delete the test runner swift container at that point |
9 | - # to reduce cluttering swift -- vila 2014-10-02 |
10 | + # The test runner swift container has been processed and can die |
11 | + self.tr_data_store.delete(recursive=True) |
12 | report_queue = request.get('report_queue', None) |
13 | if report_queue is not None: |
14 | # Publish a message to report where the results have been stored |
15 | |
16 | === modified file 'britney_proxy/britney/tests/test_process_results.py' |
17 | --- britney_proxy/britney/tests/test_process_results.py 2014-10-10 09:31:54 +0000 |
18 | +++ britney_proxy/britney/tests/test_process_results.py 2014-10-29 13:55:51 +0000 |
19 | @@ -93,3 +93,6 @@ |
20 | britney_name = self.handler.mapper.get_artifact_name('fake.log') |
21 | actual_content = self.britney_data_store.get_file(britney_name) |
22 | self.assertEquals(fake_content, actual_content) |
23 | + # The test runner data store has been removed |
24 | + self.assertFalse(os.path.exists(self.tr_ds_path), |
25 | + '{} should have been deleted'.format(self.tr_ds_path)) |
26 | |
27 | === modified file 'ci-utils/ci_utils/testing/fixtures.py' |
28 | --- ci-utils/ci_utils/testing/fixtures.py 2014-10-10 10:00:49 +0000 |
29 | +++ ci-utils/ci_utils/testing/fixtures.py 2014-10-29 13:55:51 +0000 |
30 | @@ -87,7 +87,8 @@ |
31 | self.delete_file(f) |
32 | |
33 | def delete(self, recursive=False): |
34 | - self.clear() |
35 | + if recursive: |
36 | + self.clear() |
37 | os.rmdir(self.container_id) |
38 | |
39 | def file_path(self, filename): |
40 | |
41 | === modified file 'ci-utils/ci_utils/tests/test_fixtures.py' |
42 | --- ci-utils/ci_utils/tests/test_fixtures.py 2014-10-10 10:00:49 +0000 |
43 | +++ ci-utils/ci_utils/tests/test_fixtures.py 2014-10-29 13:55:51 +0000 |
44 | @@ -85,9 +85,18 @@ |
45 | def test_delete(self): |
46 | self.assertTrue(os.path.exists(self.ds_path)) |
47 | self.ds.put_file('foo', 'foo content\n') |
48 | - self.ds.delete() |
49 | + self.ds.delete(recursive=True) |
50 | self.assertFalse(os.path.exists(self.ds_path)) |
51 | |
52 | + def test_delete_not_empty(self): |
53 | + self.assertTrue(os.path.exists(self.ds_path)) |
54 | + self.ds.put_file('foo', 'foo content\n') |
55 | + with self.assertRaises(OSError) as cm: |
56 | + self.ds.delete() |
57 | + # FIXME: Ideally the fake data store and the real one should throw the |
58 | + # same exception in this case, not a big deal -- vila 2014-10-29 |
59 | + self.assertEqual(errno.ENOTEMPTY, cm.exception.args[0]) |
60 | + |
61 | |
62 | class TestUsingFakeDataStore(unittest.TestCase): |
63 | |
64 | |
65 | === modified file 'coverage-retriever/coverageretriever/tests/__init__.py' |
66 | --- coverage-retriever/coverageretriever/tests/__init__.py 2014-10-13 20:36:54 +0000 |
67 | +++ coverage-retriever/coverageretriever/tests/__init__.py 2014-10-29 13:55:51 +0000 |
68 | @@ -19,8 +19,12 @@ |
69 | |
70 | from mock import patch |
71 | |
72 | + |
73 | +from ucitests import fixtures as uci_fixtures |
74 | + |
75 | + |
76 | from ci_utils.amqp_worker import AMQPWorker |
77 | -from ci_utils.testing.fixtures import FakeDataStore |
78 | +from ci_utils.testing import fixtures |
79 | |
80 | vanilla_build_log = u""" |
81 | ===== BEGIN coverage.xml ===== |
82 | @@ -99,11 +103,16 @@ |
83 | |
84 | class CoverageRetrieverTestCase(unittest.TestCase): |
85 | |
86 | + def setUp(self): |
87 | + super(CoverageRetrieverTestCase, self).setUp() |
88 | + # We'll use fixtures.FakeDataStore that requires disk resources |
89 | + uci_fixtures.set_uniq_cwd(self) |
90 | + |
91 | @contextmanager |
92 | def patch_create_data_store(self): |
93 | """Patch in a FakeDataStore for testing.""" |
94 | - self.fake_data_store = FakeDataStore('fake_ticket_id') |
95 | - self.addCleanup(self.fake_data_store.delete) |
96 | + self.fake_data_store = fixtures.FakeDataStore('fake_ticket_id') |
97 | + self.addCleanup(self.fake_data_store.delete, recursive=True) |
98 | with patch.object( |
99 | AMQPWorker, |
100 | '_create_data_store', |
PASSED: Continuous integration, rev:866 s-jenkins. ubuntu- ci:8080/ job/uci- engine- ci/1637/
http://
Executed test runs:
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/uci- engine- ci/1637/ rebuild
http://