Re: [Launchpad-dev] Branching Ubuntu, again

2010-04-19 Thread James Westby
On Mon, 19 Apr 2010 13:32:24 +1200, Michael Hudson 
michael.hud...@canonical.com wrote:
 It's on https://wiki.ubuntu.com/NewReleaseCycleProcess, but only as:
 
 # Notify James Westby/Jonathan Lange to initialize the branches for the 
 new series.
 
 We'll need to run:
 
 ./scripts/branch-distro.py -v ubuntu lucid maverick
 
 And at the end of the run we need to run something like:
 
 update branch set next_mirror_time = CURRENT_TIMESTAMP AT TIME ZONE 
 'UTC' where id in (select branch from seriessourcepackagebranch where 
 distroseries in (select distroseries.id from distroseries, distribution 
 where distroseries.name in ('lucid', 'maverick') and distribution.name = 
 'ubuntu'))
 
 to trigger the puller to run.  Last time this clogged up the branch 
 puller queue for several hours, so maybe we should run something like:
 
 update branch set next_mirror_time = CURRENT_TIMESTAMP AT TIME ZONE 
 'UTC' where id in (select branch from seriessourcepackagebranch where 
 distroseries in (select distroseries.id from distroseries, distribution 
 where distroseries.name in ('lucid', 'maverick') and distribution.name = 
 'ubuntu' limit 500))
 
 every so often until it doesn't update any rows, or something that 
 spreads next_mirror_time for these branches evenly over the next 10 hours.

Great, thanks for the information. Should I file an RT or something so
that the LOSAs are aware that this will need to be done?

 * Anything I have forgotten?
 
 The timing hasn't really worked out, but I'm working on removing the 
 hosted/mirrored split for Launchpad branches, so next time the script 
 will be simpler and faster, as well as not needing to do the 
 next_mirror_time frobbing.

Well, it's not like this is going to be a one-time event.

Thanks,

James


___
Mailing list: https://launchpad.net/~launchpad-dev
Post to : launchpad-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-dev] Branching Ubuntu, again

2010-04-19 Thread Max Bowsher
On 19/04/10 02:32, Michael Hudson wrote:
 to trigger the puller to run.  Last time this clogged up the branch
 puller queue for several hours, so maybe we should run something like:
 
 update branch set next_mirror_time = CURRENT_TIMESTAMP AT TIME ZONE
 'UTC' where id in (select branch from seriessourcepackagebranch where
 distroseries in (select distroseries.id from distroseries, distribution
 where distroseries.name in ('lucid', 'maverick') and distribution.name =
 'ubuntu' limit 500))
 
 every so often until it doesn't update any rows, or something that
 spreads next_mirror_time for these branches evenly over the next 10 hours.

I think your limit clause is in the wrong place and you're missing a
qualification to avoid touching branches a previous execution of the
query has already touched.

Max.



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~launchpad-dev
Post to : launchpad-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-dev] Branching Ubuntu, again

2010-04-19 Thread Gavin Panella
On 19 April 2010 02:32, Michael Hudson michael.hud...@canonical.com wrote:
 update branch set next_mirror_time = CURRENT_TIMESTAMP AT TIME ZONE 'UTC'
 where id in (select branch from seriessourcepackagebranch where distroseries
 in (select distroseries.id from distroseries, distribution where
 distroseries.name in ('lucid', 'maverick') and distribution.name = 'ubuntu'
 limit 500))

Fwiw, to scatter the next_mirror_time over the next, say, 5 days you
can do something like:

  UPDATE branch SET next_mirror_time = (
CURRENT_TIMESTAMP AT TIME ZONE 'UTC' + (
  random() * INTERVAL '5 days'))
  WHERE id ...

We've used this to band-aid checkwatches a few times :-/

Gavin.

___
Mailing list: https://launchpad.net/~launchpad-dev
Post to : launchpad-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-dev] Changes to ec2 test/land

2010-04-19 Thread Karl Fogel
Maris Fogels maris.fog...@canonical.com writes:
Danilo, I have a fix for this here:
  lp:~mars/launchpad/fix-ec2-email-encoding

Maris, this makes me wonder: do we have a policy on where encoding of
strings happens?  Some projects state that all strings beyond a certain
boundary in the API will be in UTF-8 (or whatever).  Your fix is great,
but this seems like the sort of bug that will bite us again.

I don't see anything in the dev wiki about it, and don't recall any such
guideline from conversations about Launchpad coding.  Is there one, or
if not, should there be?

-Karl

___
Mailing list: https://launchpad.net/~launchpad-dev
Post to : launchpad-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-dev] Changes to ec2 test/land

2010-04-19 Thread Maris Fogels

On 04/19/2010 10:36 AM, Karl Fogel wrote:

Maris Fogelsmaris.fog...@canonical.com  writes:

Danilo, I have a fix for this here:
  lp:~mars/launchpad/fix-ec2-email-encoding


Maris, this makes me wonder: do we have a policy on where encoding of
strings happens?  Some projects state that all strings beyond a certain
boundary in the API will be in UTF-8 (or whatever).  Your fix is great,
but this seems like the sort of bug that will bite us again.

I don't see anything in the dev wiki about it, and don't recall any such
guideline from conversations about Launchpad coding.  Is there one, or
if not, should there be?

-Karl


I do not know of any policy.  I just used the Python rule of thumb: encoding and 
decoding happens at the boundaries; Use unicode objects in between.  I agree 
that this could be a problem in the future though.


I think the code structure is the issue here.  There are .encode() lines 
scattered throughout the module.  My preferred solution in this case would be to 
extract a SubmitOptions object to hold the mail-related options.  I would add a 
write_option_to_file() method to the object that would be the single point for 
binary encoding to take place.



Maris

___
Mailing list: https://launchpad.net/~launchpad-dev
Post to : launchpad-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-dev
More help   : https://help.launchpad.net/ListHelp