Merge lp:~cjohnston/uci-engine/1300347 into lp:uci-engine

Proposed by Chris Johnston
Status: Merged
Approved by: Chris Johnston
Approved revision: 417
Merged at revision: 417
Proposed branch: lp:~cjohnston/uci-engine/1300347
Merge into: lp:uci-engine
Diff against target: 39 lines (+6/-7)
1 file modified
juju-deployer/deploy.py (+6/-7)
To merge this branch: bzr merge lp:~cjohnston/uci-engine/1300347
Reviewer Review Type Date Requested Status
Paul Larson Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+213518@code.launchpad.net

Commit message

Catch DataStore missing/invalid auth info exception

Description of the change

Missing/invalid auth info exception was not caught in the deploy.py code

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

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

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

review: Approve (continuous-integration)
Revision history for this message
Paul Larson (pwlars) wrote :

17 - base = os.path.join(os.path.dirname(__file__), '..')
18 print('Preparing local branch upload...')
19
20 - ciutils = os.path.join(base, 'ci-utils')
This means that we would now have to have a current ci_utils installed in order to run deploy, rather than being able to just deploy from branch right? I really like knowing that when I deploy, I'm using the version of ci-utils that is in the branch I'm working from. Is there a reason why you needed to take this out?

review: Needs Information
Revision history for this message
Chris Johnston (cjohnston) wrote :
Revision history for this message
Paul Larson (pwlars) wrote :

You are correct, I was just looking at the mp rather than the whole file. Thanks! +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'juju-deployer/deploy.py'
--- juju-deployer/deploy.py 2014-03-27 13:40:30 +0000
+++ juju-deployer/deploy.py 2014-03-31 17:15:43 +0000
@@ -27,7 +27,7 @@
27deployer_dir = os.path.abspath(os.path.dirname(sys.argv[0]))27deployer_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
28# ci-utils probably isn't in our pythonpath28# ci-utils probably isn't in our pythonpath
29sys.path.append(os.path.join(os.path.dirname(__file__), '../ci-utils'))29sys.path.append(os.path.join(os.path.dirname(__file__), '../ci-utils'))
30from ci_utils import dump_stack30from ci_utils import dump_stack, data_store
3131
3232
33# Initialize bzrlib and its plugins33# Initialize bzrlib and its plugins
@@ -295,13 +295,8 @@
295 Also set the relevant environment variables used to populate the deployer295 Also set the relevant environment variables used to populate the deployer
296 scripts and charm configurations.296 scripts and charm configurations.
297 """297 """
298 base = os.path.join(os.path.dirname(__file__), '..')
299 print('Preparing local branch upload...')298 print('Preparing local branch upload...')
300299
301 ciutils = os.path.join(base, 'ci-utils')
302 sys.path.append(ciutils)
303 from ci_utils import data_store
304
305 config = {300 config = {
306 'auth_url': os.environ['OS_AUTH_URL'],301 'auth_url': os.environ['OS_AUTH_URL'],
307 'auth_user': os.environ['OS_USERNAME'],302 'auth_user': os.environ['OS_USERNAME'],
@@ -309,7 +304,11 @@
309 'auth_tenant_name': os.environ['OS_TENANT_NAME'],304 'auth_tenant_name': os.environ['OS_TENANT_NAME'],
310 'auth_region': os.environ['OS_REGION_NAME']305 'auth_region': os.environ['OS_REGION_NAME']
311 }306 }
312 ds = data_store.DataStore('ci-payload', config, public=True)307 try:
308 ds = data_store.DataStore('ci-payload', config, public=True)
309 except data_store.DataStoreException as exc:
310 error_msg = ("ERROR: data-store: {}")
311 sys.exit(error_msg.format(exc))
313312
314 with tempfile.NamedTemporaryFile() as ball:313 with tempfile.NamedTemporaryFile() as ball:
315 fingerprint = build_payload(ball.name)314 fingerprint = build_payload(ball.name)

Subscribers

People subscribed via source and target branches