Merge lp:~allenap/pyjuju/maas-anon-urls-2 into lp:pyjuju
Status: | Rejected |
---|---|
Rejected by: | Gavin Panella |
Proposed branch: | lp:~allenap/pyjuju/maas-anon-urls-2 |
Merge into: | lp:pyjuju |
Prerequisite: | lp:~jtv/pyjuju/maas-anon-urls |
Diff against target: |
325 lines (+119/-133) 2 files modified
juju/providers/maas/files.py (+25/-30) juju/providers/maas/tests/test_files.py (+94/-103) |
To merge this branch: | bzr merge lp:~allenap/pyjuju/maas-anon-urls-2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kapil Thangavelu (community) | Needs Fixing | ||
Review via email: mp+150450@code.launchpad.net |
Description of the change
When requesting a file from MAAS using the new-style URLs, it's necessary to differentiate between a 404 response that means "this file does not exist" and "no handler found for this path". In the latter case it means that we ought to fall back to the legacy URL (?op=get&
This was a result of a long discussion between Raphaël and myself. We haven't documented this yet, so please ask me questions (it is late here so I'm too lazy to document the whole story). However, I suspect this is not the end of the story...
Unmerged revisions
- 652. By Gavin Panella
-
Better docs, clean-ups.
- 651. By Gavin Panella
-
Remove MAASFileStorage
.get_url; it is unused. - 650. By Gavin Panella
-
Reimplement MAASFileStorage.get using fetch.
- 649. By Gavin Panella
-
New method MAASFileStorage
.fetch, which will soon replace get and get_url. - 648. By Jeroen T. Vermeulen
-
Hide the FakeFileStorage factory for 404s in another factory. Sigh.
- 647. By Jeroen T. Vermeulen
-
A single 404 isn't enough to trigger an exception on a get() any more. Patch out the get_url call where 404s are ignored.
- 646. By Jeroen T. Vermeulen
-
Tiny fixup.
- 645. By Jeroen T. Vermeulen
-
Merge trunk.
- 644. By Jeroen T. Vermeulen
-
Simplified Twisted http error handling, as per review.
- 643. By Jeroen T. Vermeulen
-
anon_url has become anon_resource_uri.
get_url is a required method of the storage interface, its used when deploying charms to store a reference in the charm state for download by agents. it was happy coincidence that the change to deferred return get_url worked in jeroen's branches. The removal gives me some concern, Has this code branch been tested in practice?
The use of a response header to distinguish framework vs handler response is fine.. but speling bug numbers as part of the protocol values feels quite strange.
should jeroen's branches not be in review given this branch?