Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(378)

Issue 9666050: Make simplestreams metadata loading more robust (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 11 months ago by wallyworld
Modified:
10 years, 11 months ago
Reviewers:
dimitern, mp+166442, jameinel
Visibility:
Public.

Description

Make simplestreams metadata loading more robust When looking at each base URL to try and load the simplestreams metadata, unauthorised errors would be considered fatal and abort the search. This branch makes such errors similar to not found errors in that the next URL is attempted. https://code.launchpad.net/~wallyworld/juju-core/simplestream-url-errors/+merge/166442 Requires: https://code.launchpad.net/~wallyworld/juju-core/consolidate-common-errors/+merge/166415 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : Make simplestreams metadata loading more robust #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -16 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M environs/ec2/export_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M environs/imagemetadata/simplestreams.go View 3 chunks +5 lines, -2 lines 0 comments Download
M environs/imagemetadata/simplestreams_test.go View 2 chunks +10 lines, -3 lines 0 comments Download
M environs/jujutest/metadata.go View 4 chunks +18 lines, -4 lines 0 comments Download
M environs/jujutest/metadata_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M environs/openstack/export_test.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/openstack/provider.go View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5
wallyworld
Please take a look.
10 years, 11 months ago (2013-05-30 05:44:51 UTC) #1
jameinel
LGTM
10 years, 11 months ago (2013-05-30 06:05:25 UTC) #2
dimitern
LGTM with one suggestion. https://codereview.appspot.com/9666050/diff/1/environs/imagemetadata/simplestreams.go File environs/imagemetadata/simplestreams.go (right): https://codereview.appspot.com/9666050/diff/1/environs/imagemetadata/simplestreams.go#newcode214 environs/imagemetadata/simplestreams.go:214: func getMaybeSignedImageIdMetadata(baseURLs []string, indexPath string, ...
10 years, 11 months ago (2013-05-30 11:42:04 UTC) #3
wallyworld
*** Submitted: Make simplestreams metadata loading more robust When looking at each base URL to ...
10 years, 11 months ago (2013-05-31 01:37:12 UTC) #4
wallyworld
10 years, 11 months ago (2013-05-31 01:40:37 UTC) #5
On 2013/05/30 11:42:04, dimitern wrote:
> LGTM with one suggestion.
> 
>
https://codereview.appspot.com/9666050/diff/1/environs/imagemetadata/simplest...
> File environs/imagemetadata/simplestreams.go (right):
> 
>
https://codereview.appspot.com/9666050/diff/1/environs/imagemetadata/simplest...
> environs/imagemetadata/simplestreams.go:214: func
> getMaybeSignedImageIdMetadata(baseURLs []string, indexPath string, ic
> *ImageConstraint, requireSigned bool) ([]*ImageMetadata, error) {
> now that's a method name that tells a whole story :)
> 
>
https://codereview.appspot.com/9666050/diff/1/environs/imagemetadata/simplest...
> environs/imagemetadata/simplestreams.go:255: return nil, dataURL,
> errors.Unauthorizedf("unauthorised access to URL %q", dataURL)
> let's stick to one form: unauthorized or unauthorised - i prefer the former.

Ah I forgot to fix this before submitting :-( I'll do it as a driveby in another
branch.
"unauthorised" is the correct spelling as that's the proper Queen's English used
in UK and Australia and elsewhere all over the world. The z form is the American
spelling.
But sadly Go uses the z form (eg http.Unauthorized) so I guess we have to stick
to that :-(
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b