-
Notifications
You must be signed in to change notification settings - Fork 880
#401 #404
Conversation
Docker-DCO-1.1-Signed-off-by: Mangled Deutz <olivier@webitup.fr> (github: dmp42)
Docker-DCO-1.1-Signed-off-by: Mangled Deutz <olivier@webitup.fr> (github: dmp42)
Docker-DCO-1.1-Signed-off-by: Mangled Deutz <olivier@webitup.fr> (github: dmp42)
Docker-DCO-1.1-Signed-off-by: Mangled Deutz <olivier@webitup.fr> (github: dmp42)
Also see #403 for open questions on release management / branching strategy. |
Can you add this to the 0.7.1 changelog? 3faf029 otherwise lgtm! |
On Mon, Jun 02, 2014 at 02:20:34AM -0700, Mangled Deutz wrote: Instead of extracting cfg.get('storage_path') and passing it |
@wking strong coupling between an opaque config object (registry side) and driver is IMO bad, and I want to break/reduce it. I would really prefer explicit arguments whenever possible. Indeed, most if not all drivers have a concept of base path (or prefix), which is why this one should really be different from the other driver-specific configs. Just thinking aloud, though - and admittedly, that point wasn't discussed when the abstract interface was designed, but it can sure be now. Best. |
@shin- sure! I'll look into it tomorrow morning - ping me if you want anything else into 0.7.1 before I pypi it. |
It's already in master, just having it documented in the Changelog.md file would be great. :) |
@shin- it's on master but not on "stable/0.7" (which I cut from 0.7.0). Best. |
Mangled Deutz wrote:
Agreed. It would be nice to have a namespace for all storage-side config options, and then something like:
With a ConfigParser-based config file format, the kwarg extraction would just be:
in Python 3.2 and:
in older Pythons. The specifics of a driver's config are completely orthogonal to the rest of the registry core, so anything other than opaque config forwarding seems overcomplicated.
Maybe all existing drivers do, but I could imagine a storage backend based on a database that doesn't need a base path or prefix. In any case, this is still guessing about the semantics of a hypothetical (or at least external) driver's config, and I don't see any gains by doing that in the core code. |
We can imagine it - then it would be an exception to the general rule, and it should just ignore the argument (as the path arg is optional anyhow). Either way, even with a database, a "translated" path make sense (table prefixes for eg).
The gain is that whenever / if we change the configuration format for storage_path, we don't need to patch ALL drivers, but just the registry (mapping between the config key and the arg) - which is exactly what happens here - I don't want to touch the driver itself. Anyhow, the future may be like what we did for Hipache - use uris as a configuration provider for most "common" variables (see /~https://github.com/dotcloud/hipache/tree/master/lib/drivers). eg:
The benefit is that uris are a well-defined way to represent said information, and are both expressive and compact notations. Still need to review the drivers and see if that make sense - but this is getting OT - more on that later! Thanks for the review! |
On Tue, Jun 03, 2014 at 02:14:20AM -0700, Mangled Deutz wrote:
Why have a mapping between the config key and the arg that's more than
I'm fine with that too, since it's just another way to make the
Fair enough :p. And sorry for drilling down on these design decisions |
Docker-DCO-1.1-Signed-off-by: Mangled Deutz <olivier@webitup.fr> (github: dmp42)
… sending basic auth headers and overwriting token) Docker-DCO-1.1-Signed-off-by: Joffrey F <joffrey@docker.com> (github: dmp42)
Docker-DCO-1.1-Signed-off-by: Mangled Deutz <olivier@webitup.fr> (github: dmp42)
fix #401 + bump the version to 0.7.1
If this is ok:
We may wait a bit to release 0.7.1, or release it right away (what do you think?).