Comment 7 for bug 714043

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 714043] Re: defaulting to staging is confusing

On 9 February 2011 05:25, Vincent Ladeuil <email address hidden> wrote:
> The bit that annoys me is that anonymous access is special-cased. I'd
> prefer the same behavior whether the access is anonymous or not.
>
> An alternative option would be to force the dev to specify whether he
> wants production or staging (which may give *him* a hint that staging
> may be a good option for some --dry-run mode).

I can certainly imagine app developers wanting a dry run mode; indeed
there are bugs asking for it to be done in a better way than just
through staging.

1- I'm not so convinced it should be on by default; most interfaces
default to 'actually do stuff' and then have a '--dry-run' option.
Just look at all the unix commands that have exactly that option,
whereas none that I can recall have an --actually-do-it.

2- Expressing 'dry_run', whatever the default, by choosing a service
root url, is an abstraction inversion. If Launchpad later decides it
wants to, for instance, provide a web service on the production
instance that discards data, or to do away with the staging cluster,
or whatever, every lplib-using app will need to be updated.
Conversely, if lplib provides a 'dry_run' option then we would just
need to update lplib.

3- Having most apps explicitly give a URL means that lplib can't tell
whether the app actually has an opinion about which instance to use,
or if it just wants things to work. Knowing the difference could be
useful: for instance we could have an environment variable that lets
users change it without needing to build this into every single app;
or lplib could (hypothetically) choose a good URL at run time based on
the user's location; ...