Merge lp:~jpds/launchpad/fix_361650 into lp:launchpad
| Status: | Rejected |
|---|---|
| Rejected by: | Curtis Hovey on 2010-03-09 |
| Proposed branch: | lp:~jpds/launchpad/fix_361650 |
| Merge into: | lp:launchpad |
| Diff against target: |
545 lines (+306/-19) 12 files modified
database/sampledata/current-dev.sql (+6/-0) database/sampledata/current.sql (+6/-0) database/schema/comments.sql (+1/-0) database/schema/patch-2207-20-0.sql (+19/-0) lib/lp/registry/browser/distributionmirror.py (+63/-4) lib/lp/registry/browser/tests/distributionmirror-views.txt (+1/-1) lib/lp/registry/configure.zcml (+1/-1) lib/lp/registry/interfaces/distributionmirror.py (+9/-1) lib/lp/registry/model/distributionmirror.py (+22/-0) lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt (+162/-11) lib/lp/registry/templates/distributionmirror-index.pt (+9/-0) lib/lp/registry/templates/distributionmirror-macros.pt (+7/-1) |
| To merge this branch: | bzr merge lp:~jpds/launchpad/fix_361650 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Curtis Hovey (community) | ui and code | 2010-01-04 | Needs Fixing on 2010-01-05 |
| Jonathan Lange (community) | db | 2010-01-03 | Approve on 2010-01-04 |
| Michael Nelson (community) | ui | Needs Information on 2010-01-04 | |
| Stuart Bishop | db | 2010-01-03 | Approve on 2010-01-04 |
| Canonical Launchpad Engineering | code | 2010-01-03 | Pending |
|
Review via email:
|
|||
| Jonathan Davies (jpds) wrote : | # |
- 10149. By Jonathan Davies on 2010-01-03
-
Removed trailing whitespace from lib/lp/
registry/ model/distribut ion.py. - 10150. By Jonathan Davies on 2010-01-03
-
Added a test to ensure that the content type of mirrors may not be changed.
- 10151. By Jonathan Davies on 2010-01-03
-
And finally, ensure that the country of country mirrors cannot be changed.
- 10152. By Jonathan Davies on 2010-01-03
-
To avoid confusion, correct this statement to reflect what it really means.
| Jonathan Lange (jml) wrote : | # |
Hello Jonathan,
Thanks for this patch -- I can see how this would be useful.
I don't have any serious issues with the database patch -- the uniqueness constraint looks correct to me. My main concern is that using the word 'official' to describe this new concept will create confusion with the already existing concept of 'official mirror'. Would 'primary_mirror' make sense?
Other than that, the db patch looks good to me.
jml
| Stuart Bishop (stub) wrote : | # |
I don't much like the column name either, but it does match the domain language used at http://
Why are we limiting things to one official country mirror per country? Is there a technical issue we need to ensure doesn't happen, or is this an arbitrary choice made by us or the mirror maintainers?
Patch number is patch-2207-
| Stuart Bishop (stub) wrote : | # |
> I don't much like the column name either, but it does match the domain
> language used at http://
> correct.
>
> Why are we limiting things to one official country mirror per country? Is
> there a technical issue we need to ensure doesn't happen, or is this an
> arbitrary choice made by us or the mirror maintainers?
>
> Patch number is patch-2207-
> the UNIQUE constraints are actually desirable.
One thing that needs changing - You should use 'IS TRUE' and 'IS FALSE' rather than '= TRUE' or '= FALSE'. = and IS give different results in SQL's three valued boolean arithmetic which can confuse the query planner since it isn't as smart as you.
- 10153. By Jonathan Davies on 2010-01-04
-
Instead of using "=" in DB patch, use IS as recommended.
| Jonathan Davies (jpds) wrote : | # |
Morning Jonathan,
Country mirrors are official mirrors whose FQDNs have been CNAME'ed to a $CC.[archive,
Stuart,
We're limited to one country mirror because it's not possible to load balance between two different Ubuntu archives mirrors because of limitations with the apt-get software unless the two mirrors are in perfect sync.
Also I believe, the plan is to, hopefully, auto-generate our CNAME DNS records of country mirrors using the ones specified in LP's DB by admins (with this patch). And it's not possible to have multiple CNAME records to a FQDN.
| Michael Nelson (michael.nelson) wrote : | # |
Hi Jonothan, thanks for yet another long-awaited feature :)
I'd really like to get Curtis to look at this one, although I've got a few comments.
The first question that came to my mind was, why is this another separate form (currently there is "Change details", "Review", and now "Set/Unset as country mirror".
I personally wonder whether the 'Review' form could accommodate this (perhaps renamed with something that implied official and/or country-mirror status?), so that both items could be presented and dealt with there on the one form. This would also alleviate the need for the changing menu item name ('Set/Unset'). But Curtis might have other ideas.
Also, when editing the mirror after setting it as a country mirror, the validation is great (for country/
IRC snippet:
<noodles775> jpds: what's the reasoning behind not doing this as an admin-only field displayed on the normal edit form?
<jpds> noodles775: Do you mean the +review form?
<noodles775> jpds: no, I meant the +edit form (but i'm logged in as an admin, maybe that's not presented for mirror-admins...). Checking now.
<jpds> noodles775: I wanted to make it a little obvious by having the separate button for it.
<jpds> noodles775: And mirror registrants shouldn't be able to see the checkbox themselves.
| Michael Nelson (michael.nelson) wrote : | # |
> Also, when editing the mirror after setting it as a country mirror, the
> validation is great (for country/
> redirect back to the +index page, but instead +country-mirror form itself?
Sorry, that's very unclear (and incorrect). What I meant was, once you have set a mirror as a country mirror, when you then go back and change the details (on the +edit page), the validation there is great for country/
- 10154. By Jonathan Davies on 2010-01-04
-
When a mirror registrant tries to change a country mirror's
country/content- type, error out to the +edit page instead of +index as they
might want to change something else.
| Jonathan Lange (jml) wrote : | # |
OK, since it matches the existing documented domain language, I'm happy with the column name.
- 10155. By Jonathan Davies on 2010-01-04
-
Renamed all instances of official_
country_ mirror to country_dns_mirror.
Restructured DistributionMirrorEditView to use validate() to check things. - 10156. By Jonathan Davies on 2010-01-05
-
Removed +countrymirror mirrors from +index view of distributionmir
rors.
Adapted test suite to reflect code changes done to country DNS mirrors settings. - 10157. By Jonathan Davies on 2010-01-05
-
Removed unnecessary code from previous country mirror setup.
- 10158. By Jonathan Davies on 2010-01-05
-
Changed remaining \ to a bool.
- 10159. By Jonathan Davies on 2010-01-05
-
Removed redundant method isOfficialCount
ryMirror( ). - 10160. By Jonathan Davies on 2010-01-05
-
Corrected mirror registrant can't see country_dns_mirror test.
- 10161. By Jonathan Davies on 2010-01-05
-
Fixed permission checking for removing the country_dns_mirror checkbox.
- 10162. By Jonathan Davies on 2010-01-05
-
Changed reference of official country mirror to country DNS mirror to match
changes.
| Curtis Hovey (sinzui) wrote : | # |
Hi Johnathan.
Thanks for undertaking this large effort.
I reviewed the code and the UI. There is a lot that needs fixing, but I
can help with some of it.
Starting with the UI.
I like your change to move country_dns_mirror to +edit, but per your original
concern, it is not obvious that the mirror admin uses this page to change the
state. We strive to move edit and view links into the page where the
information is presented so that it is clear to the user that he can change
what he is reading. This is a simple one-line addition to the template.
However, the addition of a new portlet makes the layout worse. This page
has known issues because it was one of the first to be changed for 3.0,
but it was not updated as 3.0 style evolved. The registration and status
information are not in their correct places: the registering slot and the
Mirror information portlet. If they were, the addition of the new field
would be easy and obvious. I tinkered with the template to fix the layout
and I have a diff that you can apply to your branch to get these changes.
In the fixed layout, the official country dns status appears higher on
the page and I think that is good.
Suggested layout: http://
Diff to revise layout: http://
I do not like the info notifications. They make me worry that my other
changes were not accepted. Since the form did what I asked it to, there
is no need to take such an extraordinary measure. I think they should be
removed.
I pondered the addition of the star to the mirrors list. Your approach is
just like badges that are applied to bugs, so I think it is correct. I think
my misgivings are from my unfamiliarity with the star as an icon. I did
learn it was official when I placed my mouse over it. I think we can leave
it as is.
BTW. There is a problem with this merge proposal. It must be merged into
db-devel since the schema changes are incompatible with lpnet/edge. If you
had proposed the merge with db-devel you would have seen that your db
patch conflicts. You need to rename it and update it as suggested by Stuart
before this can be tested properly.
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
...
> @@ -275,10 +278,66 @@
> """See `LaunchpadFormV
> return canonical_
>
> + def validate(self, data):
> + dns_mirror_choice = data.get(
> +
> + # This mirror has not been marked as a country mirror.
> + if dns_mirror_choice == True:
> + # Safe-guard against multiple country mirrors for one country.
> + current_
> + getUtility(
> + self.context.
> +
> + # User has decided to mark it as one.
> + if current_
> + # There are none - mark this one as the one.
> + sel...
| Jonathan Lange (jml) wrote : | # |
Curtis & Michael, I can't believe that you _both_ spelled Jonathan's name incorrectly. :P
| Michael Nelson (michael.nelson) wrote : | # |
On Fri, Jan 8, 2010 at 5:59 AM, Jonathan Lange <email address hidden> wrote:
> Curtis & Michael, I can't believe that you _both_ spelled Jonathan's name incorrectly. :P
Sorry Jonathan... too many Aussie friends who go by "Jono" :/
> --
> https:/
> You are reviewing the proposed merge of lp:~jpds/launchpad/fix_361650 into lp:launchpad/devel.
>
| Graham Binns (gmb) wrote : | # |
Can someone who knows the situation of this branch update its status? It'd be great if it was either WIP or Approved, just to get it out of the "reviews I can do" queue...
| Curtis Hovey (sinzui) wrote : | # |
I rejected this branch because the implementation and testing were unviable. Johnathan. Has landed the schema change and some prerequisite branches per my advice. His replacement branch to land this feature as a model change is in review.
Unmerged revisions
- 10162. By Jonathan Davies on 2010-01-05
-
Changed reference of official country mirror to country DNS mirror to match
changes. - 10161. By Jonathan Davies on 2010-01-05
-
Fixed permission checking for removing the country_dns_mirror checkbox.
- 10160. By Jonathan Davies on 2010-01-05
-
Corrected mirror registrant can't see country_dns_mirror test.
- 10159. By Jonathan Davies on 2010-01-05
-
Removed redundant method isOfficialCount
ryMirror( ). - 10158. By Jonathan Davies on 2010-01-05
-
Changed remaining \ to a bool.
- 10157. By Jonathan Davies on 2010-01-05
-
Removed unnecessary code from previous country mirror setup.
- 10156. By Jonathan Davies on 2010-01-05
-
Removed +countrymirror mirrors from +index view of distributionmir
rors.
Adapted test suite to reflect code changes done to country DNS mirrors settings. - 10155. By Jonathan Davies on 2010-01-04
-
Renamed all instances of official_
country_ mirror to country_dns_mirror.
Restructured DistributionMirrorEditView to use validate() to check things. - 10154. By Jonathan Davies on 2010-01-04
-
When a mirror registrant tries to change a country mirror's
country/content- type, error out to the +edit page instead of +index as they
might want to change something else. - 10153. By Jonathan Davies on 2010-01-04
-
Instead of using "=" in DB patch, use IS as recommended.

= Summary =
Launchpad should know which mirrors are set as official country mirrors (eg. gb.archive. ubuntu. com), so that we can track these easily on mirror listings.
This branch also includes a database change (patch- 2207-20- 0.sql) which adds a official_ country_ mirror column to distributionmirror. It also includes two constraints to ensure that there can not be more than one (archive|releases) mirror per country.
New mirrors have been added to current(-dev).sql for testing purposes too.
A mirror should only be eligible for country mirror status when:
1) it has been reviewed and set as an official mirror by an admin,
2) it has been probed for integrity,
3) it has an HTTP URL set.
4) there is no country mirror for that mirror type in the country.
Checks have been added to the code to ensure that these conditions are met.