Merge lp:~rockstar/launchpad/fix-windmill-canonicalurl into lp:launchpad
| Status: | Merged |
|---|---|
| Merged at revision: | not available |
| Proposed branch: | lp:~rockstar/launchpad/fix-windmill-canonicalurl |
| Merge into: | lp:launchpad |
| Diff against target: |
168 lines (+36/-24) 7 files modified
lib/canonical/config/__init__.py (+10/-1) lib/canonical/launchpad/webapp/vhosts.py (+5/-0) lib/canonical/testing/layers.py (+16/-0) lib/lp/bugs/windmill/tests/test_bug_tags_entry.py (+1/-3) lib/lp/code/windmill/testing.py (+0/-18) lib/lp/code/windmill/tests/test_branch_merge_proposal.py (+2/-1) lib/lp/code/windmill/tests/test_merge_proposal_commenting.py (+2/-1) |
| To merge this branch: | bzr merge lp:~rockstar/launchpad/fix-windmill-canonicalurl |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Björn Tillenius (community) | 2010-01-14 | Approve on 2010-01-14 | |
|
Review via email:
|
|||
| Paul Hummer (rockstar) wrote : | # |
| Björn Tillenius (bjornt) wrote : | # |
On Thu, Jan 14, 2010 at 12:10:25AM -0000, Paul Hummer wrote:
> === modified file 'lib/canonical/
> --- lib/canonical/
> +++ lib/canonical/
> @@ -89,6 +89,7 @@
> from zope.server.
> from zope.testing.
>
> +from canonical.
> from canonical.lazr import pidfile
> from canonical.config import CanonicalConfig, config, dbconfig
> from canonical.
> @@ -1832,6 +1833,20 @@
> os.environ[
> cls.shell_objects = start_windmill()
>
> + # Patch the config to provide the port number and not use https.
> + sites = (
> + ('vhost.mainsite', 'rooturl: http://
> + ('vhost.answers', 'rooturl: http://
> + ('vhost.
> + 'rooturl: http://
> + ('vhost.bugs', 'rooturl: http://
> + ('vhost.code', 'rooturl: http://
> + ('vhost.
> + 'rooturl: http://
> + for site in sites:
> + config.
> + allvhosts.reload()
> +
> @classmethod
> @profiled
> def tearDown(cls):
> @@ -1840,6 +1855,7 @@
> if cls.config_file is not None:
> # Close the file so that it gets deleted.
> cls.config_
> + config.
As discussed in person, this looked a bit suspicious to me. I'm not sure
it will remove all the config section that were added. Let's confirm
that this actually works. Everything else looks good.
review approve
--
Björn Tillenius | https:/
| Francis J. Lacoste (flacoste) wrote : | # |
On January 13, 2010, Björn Tillenius wrote:
> Review: Approve
>
> On Thu, Jan 14, 2010 at 12:10:25AM -0000, Paul Hummer wrote:
> > === modified file 'lib/canonical/
> > --- lib/canonical/
> > +++ lib/canonical/
> > @@ -89,6 +89,7 @@
> > from zope.server.
> > from zope.testing.
> >
> > +from canonical.
> > from canonical.lazr import pidfile
> > from canonical.config import CanonicalConfig, config, dbconfig
> > from canonical.
> > @@ -1832,6 +1833,20 @@
> > os.environ[
> > cls.shell_objects = start_windmill()
> >
> > + # Patch the config to provide the port number and not use https.
> > + sites = (
> > + ('vhost.mainsite', 'rooturl: http://
> > + ('vhost.answers', 'rooturl:
> > http://
> > + 'rooturl: http://
> > + ('vhost.bugs', 'rooturl: http://
> > + ('vhost.code', 'rooturl: http://
> > + ('vhost.
> > + 'rooturl: http://
> > + for site in sites:
> > + config.
> > + allvhosts.reload()
> > +
> > @classmethod
> > @profiled
> > def tearDown(cls):
> > @@ -1840,6 +1855,7 @@
> > if cls.config_file is not None:
> > # Close the file so that it gets deleted.
> > cls.config_
> > + config.
>
> As discussed in person, this looked a bit suspicious to me. I'm not sure
> it will remove all the config section that were added. Let's confirm
> that this actually works. Everything else looks good.
>
> review approve
>
It won't. Only the last one added. You should either push all the config in
one go:
config.
[vhost.bugs]
rooturl: ...
[vhost.
rooturl: ...
...
""")
Or start by pushing a maker config.
then rewing the config stack to that point using config.
marker")
I think the former is better, but you may disagree.
--
Francis J. Lacoste
<email address hidden>

This branch fixes bug #504479 - Basically, using canonical_url in the windmill
layers didn't work because of lack of http and needing to specify the port.
This works, and all the windmill tests still pass.