From 5a051491aa914c393c10700eb57fe517f7b27033 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 21 Jan 2015 13:18:49 -0500 Subject: [PATCH 1/2] gruntfile: support directories in our js This will allow us to create directories for individual controllers, directives, etc... --- grunt/Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grunt/Gruntfile.js b/grunt/Gruntfile.js index 526252bd1..5dd381e8d 100644 --- a/grunt/Gruntfile.js +++ b/grunt/Gruntfile.js @@ -25,7 +25,7 @@ module.exports = function(grunt) { }, }, build: { - src: ['../static/lib/**/*.js', '../static/js/*.js', '../static/dist/template-cache.js'], + src: ['../static/lib/**/*.js', '../static/js/**/*.js', '../static/dist/template-cache.js'], dest: '../static/dist/<%= pkg.name %>.js' } }, From 2eceb01e63c430597ddc712869d67e23d1c37dbc Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 28 Jan 2015 12:39:00 -0500 Subject: [PATCH 2/2] Add a bit better exception logging in the layer handling --- endpoints/registry.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/endpoints/registry.py b/endpoints/registry.py index 9209d1f3a..b4b03334f 100644 --- a/endpoints/registry.py +++ b/endpoints/registry.py @@ -137,6 +137,10 @@ def get_image_layer(namespace, repository, image_id, headers): if permission.can() or model.repository_is_public(namespace, repository): profile.debug('Looking up repo image') repo_image = model.get_repo_image_extended(namespace, repository, image_id) + if not repo_image: + profile.debug('Image not found') + abort(404, 'Image %(image_id)s not found', issue='unknown-image', + image_id=image_id) profile.debug('Looking up the layer path') try: @@ -157,7 +161,7 @@ def get_image_layer(namespace, repository, image_id, headers): return Response(store.stream_read(repo_image.storage.locations, path), headers=headers) except (IOError, AttributeError): - profile.debug('Image not found') + profile.exception('Image layer data not found') abort(404, 'Image %(image_id)s not found', issue='unknown-image', image_id=image_id) @@ -180,6 +184,7 @@ def put_image_layer(namespace, repository, image_id): uuid = repo_image.storage.uuid json_data = store.get_content(repo_image.storage.locations, store.image_json_path(uuid)) except (IOError, AttributeError): + profile.exception('Exception when retrieving image data') abort(404, 'Image %(image_id)s not found', issue='unknown-image', image_id=image_id)