/srv/irclogs.ubuntu.com/2012/05/29/#launchpad-dev.txt

lifelessbigjools: ... thunderbird00:14
lifelessbigjools: it did, then it stopped ;)00:14
bigjoolsyeah I just remembered that :)00:14
lifeless;)00:15
=== mwhudson_ is now known as mwhudson
daniloswgrant, hi, I wonder what's going on with db-stable r11611 rollout: LPS indicates it's out, but it's not merged yet in stable/devel01:14
StevenKdanilos: It will not be until it's deployed01:15
StevenKdanilos: Let me check01:15
daniloswgrant, https://wiki.canonical.com/InformationInfrastructure/OSA/LaunchpadProductionStatus lists it in 'past deployments'01:15
StevenKdanilos: Your DB patch is r11610, and the next deployment for tonight is r11615, which includes your patch.01:17
wgrantdanilos: Sorry, I forgot to merge it01:18
wgrantdanilos: Doing now01:18
wgrantdanilos: It was deployed 12 hours ago01:18
daniloswgrant, ah, ok, that explains it, thanks01:18
StevenKAh, so up next is my patch.01:18
daniloswgrant, no worries, sorry for being pushy :)01:18
wgrantThanks for the reminder.01:18
wgrantdanilos: That's landed.01:25
wgrantdanilos: You can now land the code removal01:25
daniloswgrant, cool, thanks01:25
StevenKwgrant: I might up put up my builder.description destruction branch then01:26
daniloswgrant, except that I can't (at least not that I know, if I can, woohoo and "how"), but I can ask someone to do that for me :)01:26
StevenKdanilos: Bug lifeless about emeritus01:26
wgrantStevenK: Hm?01:26
wgrantStevenK: Which branch?01:26
lifelessStevenK: danilos: I think danilos is already in emeritus, isn't he?01:27
lifelessand yes, emeritus can lnad01:27
lifeless*land*01:27
StevenKwgrant: The one that drops builder.description from the code since the DB patch to DROP NOT NULL is up next.01:27
lifelesswhile they are still @ canonical01:27
wgrantCan by policy, but you have to be in the keyring...01:27
wgrantStevenK: Right, can't land for another 9 hours, though01:27
StevenKwgrant: Sure, what I meant was "Actually push and put up for review"01:27
wgrantRight01:28
wgrantMakes sense01:28
wgrantThought that was already done, in fact.01:28
StevenKsteven@undermined:~/launchpad/lp-branches/drop-builder-description% utilities/rocketfuel-mp-status .01:28
StevenK * .01:28
StevenK   - Remote branch is up to date01:29
StevenKHm, it seems you're right.01:29
daniloslifeless, ah, cool, so I have to worry myself about running the full test suite, and then can pqm-submit? (how is ec2 test used these days?)01:29
lifelessdanilos: ec2 land is still used, its unchanged01:30
wgrantWell01:30
lifelessdanilos: it lives in lp-dev-tools now01:30
wgrantIt's in lp:lp-dev-utils01:30
lifelessbah utils01:30
wgrantRather than utilities/01:30
wgrantBut otherwise the same.01:30
wgrantIn the branch, 'ec2 land'01:30
danilosah, ok01:30
StevenKwgrant: https://code.launchpad.net/~stevenk/launchpad/drop-builder-description/+merge/107698 would enjoy your review01:33
wgrantStevenK: Can you use the factory to replace most of create_builder?01:35
wgrantMost or all01:36
StevenKIt would end up looking pretty much the same, and the doctest already wants IBuilderSet01:36
wgrantfactory.makeBuilder(name='hamburger', processor=i386, virtualized=True)01:36
wgrantNo helper required01:36
StevenKwgrant: Although that points I missed out fixing factory.makeBuilder() :-)01:38
StevenKwgrant: Diff updated, can you have another look?01:51
lifelesswgrant: hey, you know what? We don't need that private API for sso anymore02:44
lifelesswgrant: not with your new regular API method02:45
wgrantlifeless: For performance I think we do.03:07
lifelesswgrant: two in-dc calls vs 1 ?03:08
wgrantlifeless: How do you plan to find all of the relevant team memberships?03:09
lifelessparticipation03:09
wgrantIt would require a new call.03:10
wgrantBut could be done.03:10
lifelesswgrant: super_teams ?03:11
wgrantlifeless: Is a collection that returns a limited batch of participations.03:12
lifelesspass a batch in greater than the current high-end, and iterate if needed03:13
lifelesswgrant: most folk will be <= 1 batch03:14
wgrantYeah, multiple 300ms batch loads per authentication attempt isn't high on my list of things that are good ideas :)03:15
lifelesswhere are you getting that time from ?03:17
lifelesswgrant: but looking at it, it includes the whole metacrazydata03:18
lifelessrather than just providing references.03:18
lifeless\o/03:18
lifelesswhee03:19
lifelessperson:+contactuser03:19
lifeless99% under 32 seconds.03:19
wgrantYup03:19
lifeless+cve is still horrid too03:19
lifeless2303:19
wgrantlifeless: OK, so it looks like without auth you can make an API request in about 100-120ms.03:20
wgrantauth will increase that a fair bit.03:20
lifelesswgrant: because?03:21
wgrantlifeless: Because our auth code is awful03:22
lifelessfixable or unfixable ?03:22
wgrantFixable.03:23
lifelessthere we go then03:23
lifelessDistroSeries:+builds is heinous03:25
lifelessever seen Branch:+try-again ???03:25
wgrantYeah03:26
wgrantIt is always either very fast or extremely slow03:26
wgrantProbably due to lock contention, I guess.03:26
wgrantBut maybe not.03:26
lifeless Distribution:+topcontributors is good03:26
wgrantI'm not sure why that's so bad03:27
wgrantI haven't looked at a query log.03:27
wgrantBut it doesn't make sense for it to be slow.03:27
wgrantUnless it's all unindexed, I guess.03:27
lifelessmhm03:31
lifelessUnknown03:31
lifeless9.5M hits03:31
lifeless(over a month)03:31
wgrant404?03:31
lifelessnot sure03:31
lifelessneed to heckle someone to dig and identify causes03:32
lifelessahhaha03:33
lifelesson https://devpad.canonical.com/~lpqateam/ppr/lpnet/latest-monthly-pageids.html03:33
lifeless'SimpleViewClass from /srv/launchpad.net/production/launchpad-rev-15099/lib/lp/bugs/browser/../templates/buglisting-embedded-advanced-search.pt:JsonModelNamespaceView'03:33
lifelesspage it03:33
lifelesspage id03:33
lifelessit really is03:33
lifelessI need a guesstimate03:43
lifelesshow long to instantiate 122 feature rules03:43
wgrantThey don't have enumcols, so it should be pretty quick.03:44
lifelessyah03:44
lifelessand a linear lookup of simple values is fast, given we cache results03:44
lifelessso it should be safe03:44
wgrantAlso, where'd you get 122?03:44
wgrantOh03:44
lifelessyou should have enough data to infer03:45
wgrantYou want to add 122 exceptions?03:45
wgrantAnd lower the timeout?03:45
lifelessyes03:45
wgrantI'm not sure that all of them deserve exceptions.03:47
wgrantBut perhaps.03:47
lifelessit makes reasoning about it easy03:47
wgrantI prefer reasoning recklessly.03:47
wgrantIt generally gives much better results.03:47
wgrantMore rapidly.03:47
StevenKwgrant: Can haz review?04:34
wgrantStevenK: Oh right, it's still trying to submit.04:39
wgrantI had too many MPs open04:39
wgrantDone04:39
StevenKSo tempted to put a Portal 2 reference in the commit message.04:41
StevenK"Delete Builder.description from the code for standing around, smelling and being useless."04:41
StevenKwgrant: http://pastebin.ubuntu.com/1012579/  is that what you envisioned, or am I on the wrong track?04:44
wgrantStevenK: Looks like a reasonable start, indeed.04:47
StevenKRight, excellent.04:48
StevenKNeeds tests for Branch:+edit and then it's done, I think.04:48
StevenKwgrant: I'm a little unhappy about the IBranch.implementedBy() bit, but that should hopefully be short lived.04:49
wgrantStevenK: You probably want providedBy, too, but indeed04:49
StevenKBlink.04:55
StevenKOn Bug:+index the text turns up on page load and then disappears.04:55
* StevenK blames wallyworld_.04:55
wallyworld_StevenK: what have i done?05:53
StevenKwallyworld_: I've refactored out the Information Type portlet into a seperate class that is subclassed by BugView. Loading up Bug:+index shows the right text in the portlet for a few seconds which then disappears. I think the JS is to blame.05:56
wallyworld_StevenK: this isn't on prod is it? seems to work there05:59
StevenKwallyworld_: It is not on prod, no.05:59
wallyworld_ok, so only in your local branch05:59
wallyworld_when you say text, you mean the description that sits below the choice source popup widget?06:00
StevenKwallyworld_: Nope, everything06:00
wallyworld_hmmm06:01
StevenKwallyworld_: Do you want me to commit and push this mess, or you want to mull it over?06:03
wallyworld_i was going to look at the mp for the branch i recently landed but since it's merged, the diff is no longer available :-(06:03
wallyworld_so go ahead and commit it06:03
StevenKwallyworld_: I *HATE* that bug06:04
wallyworld_i didn't realise it was a bug06:04
wallyworld_i though it was intended06:04
StevenKIt didn't used to happen, I think.06:05
bigjoolsit's when you push new revisions after merge IIRC06:05
wallyworld_i can't remember06:05
bigjoolsor something causes a scan on it06:05
StevenKbigjools: I thought it was because the destination branch changes06:05
wallyworld_so why does it discard the diff?06:05
bigjoolsI'm not aware that matters06:06
bigjoolsit regenerates a diff - which is empty06:06
wallyworld_hmm. ok.06:06
StevenKbigjools: Because the target branch now incorporates the changes that in the source branch06:06
wallyworld_so perhaps it should retain the last diff in that case06:07
bigjoolsStevenK: wouldn't that mean all of our diffs, ever, get regenerated?06:07
bigjoolsfor ever06:07
StevenKbigjools: That seems to be happening anyway06:07
StevenKwallyworld_: https://code.launchpad.net/~stevenk/launchpad/branch-information_type-ui06:11
* wallyworld_ looks06:11
wallyworld_StevenK: the initialise of the InfoTypePort;et is not being called06:23
wallyworld_stupid python class inheritance stuff06:23
StevenKOh, it won't call *all* subclasses that have an initialize() method?06:24
wallyworld_nope, not unless they call super themselves06:25
wallyworld_afaiui06:25
StevenKwallyworld_: But InformationTypePortlet doesn't have a superclass06:25
StevenKwallyworld_: Do you want to try that? lib/lp/app/browser/information_type.py06:26
wallyworld_StevenK: i think it's stopping the chain at LaunchpadView06:26
StevenKLaunchpadView is the first superclass06:26
wallyworld_since it's initialise() just passes06:26
wallyworld_and so the other superclasses are nw called06:26
StevenKPerhaps it will stop after the first one06:27
wallyworld_StevenK: put LaunchadView last in the inheritance list06:27
wallyworld_it works then06:28
wallyworld_StevenK: afaiui, it calls super in order from left->right06:28
wallyworld_and if one stops, then boom06:28
wallyworld_they each have to call super to keep it going06:28
StevenKAnd BugViewMixin does not?06:29
StevenKIt doesn't have an initialize(), so I guess not06:29
wallyworld_BVMixin does not implement that method06:29
wallyworld_bit of a trap that one06:33
wallyworld_and so of course it was the bugtask_index javascript that didn;t see the expected stuff in the request cache06:33
wallyworld_so it duely hid the info type stuff06:33
bigjoolsok, how can I convince LP that actually, yes, my GPG signature valid on MP emails07:23
jelmerbigjools: use MIME?07:39
* bigjools does a Marcel Marceau impression07:40
bigjoolsWhat is mime for fucked?07:41
* stub mimes 'fucked'07:49
adeuringgood morning07:50
czajkowskialoha08:03
lifelessbigjools: I think you want the hip thrust for that one08:04
jmlhello08:37
jelmerohai08:38
=== danhg_ is now known as danhg
jmlso, to upgrade to pg 9.1 in dev env, I just remove pg 8.4, install 9.1 and then run database-setup?09:18
StevenKjml: Pretty much09:20
StevenKjml: Also make sure 9.1 is listening on 543209:20
mwhudsoni once tried to figure out how the debian packages created clusters listening on different ports09:25
jmlso the metapackages are all broken atm then?09:30
jmlok, I'm confused.09:30
jmllaunchpad-database-setup configures pg to run on 543309:30
jmlso how can I make sure it's running on 543209:31
jmlffs09:39
jmlnow I'm getting "invalid data directory"09:39
jmlgraet.09:39
=== gmb changed the topic of #launchpad-dev to: http://dev.launchpad.net/ | On call reviewer: gmb | Firefighting: - | Critical bugs: 3.47*10^2
jmlhttp://paste.ubuntu.com/1012845/ what am I doing wrong?09:55
mgznothing obvious, tries 5432... what's in /var/run/postgresql actually?09:58
jmljml@lpdev:/var/run/postgresql$ sudo cat 9.1-main.pid10:00
jml762310:00
jmljust that.10:00
jmlalso,10:03
jml$ ls -a10:03
jml.  ..  9.1-main.pid  .s.PGSQL.5433  .s.PGSQL.5433.lock10:03
mgzokay, so it is listening on the wrong port10:03
mgzchange that in the postgre conf and restart?10:05
jmland then manually run the createuser commands, I guess?10:07
mgzthere's probably a better way, but naturally it just worked for me previously.10:09
jmlpsql:launchpad-2209-00-0.sql:17: ERROR:  language "plpgsql" already exists10:10
jmlpsql:launchpad-2209-00-0.sql:2646: ERROR:  could not access file "$libdir/plpython": No such file or directory10:10
jmlare they fatal errors?10:10
stubjml: The second is - postgresql-plpython-9.1 is not installed.10:14
jmlstub: thanks.10:14
jmlstub: Ubuntu says it's already installed though.10:15
stubjml: If you run 'psql', does it say the server version is 9.1 in the startup banner message?10:15
jmlpsql (9.1.3)10:16
jmlType "help" for help.10:16
jmlyes.10:16
stubjml: oic. No, that isn't a fatal error. It will go away soon now we are 9.1 everywhere and can clean that up.10:17
jmlstub: cool. thanks.10:17
jmlwhile you're around...10:17
jmlI'm aiming to rename a DB column. The branch I submit against db-devel needs to update the code for the rename as well as adding the patch that does the rename, right?10:18
StevenKjml: You can not do that.10:19
jmlStevenK: Do what? Rename a column?10:20
StevenKjml: You can't change code at the same time10:20
cjwatson(Because database and appserver rollouts are decoupled.)10:21
jmlhmm.10:22
nigelbcjwatson: Are you rotating with LP this cycle?10:22
jmlso either I can't do a rename10:22
cjwatsonnigelb: No, I just have a number of LP-related projects10:22
jmlor I have to update the code to somehow work with both naes.10:22
jmlnames, rather.10:22
nigelbcjwatson: Ah, nice. :)10:22
cjwatsonjml: If you figure out a neat approach, I have a low-priority bug that could use it.  IIRC wgrant told me that we haven't renamed any columns since the introduction of fastdowntime.10:22
czajkowski*grin*10:23
jmlcjwatson: Ah, I see.10:24
cjwatsonjml: In my case (bug 1000570) I renamed the API but left the DB column for "later".10:24
_mup_Bug #1000570: "Packageset.score" is badly named <qa-untestable> <tech-debt> <trivial> <Launchpad itself:Triaged> < https://launchpad.net/bugs/1000570 >10:24
jmlcjwatson: right, that's what I've done. I'm just making later, now.10:24
cjwatsonWilliam suggested a trigger approach that I'm afraid I didn't understand.10:25
jmlstub: any thoughts on how to do a column rename?10:25
stubjml: Yes. Ideally, minimize the code using a property or something10:25
stubjml: Actually, hang on10:25
* jml does so10:26
stubjml: So code changes and db changes are not synchronized.10:26
stubjml: Which means first a code change that makes things work with the old column name and the new column name.10:26
stubjml: Then the db patch doing the rename. Then a cleanup.10:27
stubjml: Which all sucks.10:27
StevenKWelcome to FDT.10:27
jmlok. hmm.10:27
stubWho asked for this again?10:27
StevenKAnd oh, your patch will wait for a week because lifeless lives in 1990.10:27
jmlme.10:27
jmlI'm renaming Archive.commercial to Archive.suppress_subscription_notifications. Have done so in code, using a property.10:29
cjwatsonStevenK: Aren't we almost up to date on DB deployments now10:29
stubjml: There could be some magic we do with PG, but I think it will end up more complex. Might be necessary if making a Storm class not care which of two column names is in use is a pita.10:29
cjwatson?10:29
StevenKcjwatson: I'm just bitter.10:29
StevenKcjwatson: It is usually pretty good, stuff has been held up due to 9.1 so we had a two week backlog10:30
cjwatsonI know10:31
stub(magic being an updatable view, making code use the updatable view, do the rename, make the code use the table again)10:31
StevenKAnd that is counting the five or six DB patches Purple wants to land.10:31
jmlstub: Archive inherits from SQLBase and we don't ever query on this column, so I think I can hack something up in Python.10:39
jmltesting will be a pain though.10:39
stubjml: Or if that code isn't used, extract it, do the rename, put it back + fix.10:42
jmlstub: it is used, I'm afraid.10:42
stubjml: Just saw your email. Did you fix the PG port issue?10:46
jmlstub: manually. I changed the port again in postgresql.conf; restarted; ran createuser by hand.10:47
stubjml: I think you might see that if /etc/postgresql/8.4/main/postgresql.conf still exists and specifies port=543210:47
stubCan you check? Means there is another step after uninstalling the packages.10:47
jmlstub: make schema seemed to work OK, apart from the errors I mentioned earlier re plpython10:47
=== Pendulum_ is now known as Pendulum
=== garyposter is now known as gary_poster
james_wif a test is failing because it is escaping isolation due to a /+branch-id/ path being interpreted by bzr as being a filesystem path, does that mean that the test has to run with more of codehosting working?13:33
james_wor perhaps it needs more plugins loaded beforehand?13:34
james_wjml, do you know?13:38
jmljames_w: hi13:39
jmljames_w: plugins, I think.13:39
james_wthanks13:41
jmlhmm13:51
jmlthinking out loud about column renaming13:53
jmlif we want one code base to work with both column names, then we either need some way of interrogating the schema at class creation time or some way of trapping errors at query time and updating the class then13:54
jmlI'm probably missing other options, but those seem to be it for me13:55
jmlthe problem with doing something on class creation is that it will add a query for everything that imports archive.py13:56
jmlwhich is probably everything13:56
jmla problem with trapping at query time is that there's no obvious single choke point13:57
cjwatsonTurn the attribute into a @property?13:58
cjwatson(This may not be the best approach, more an existence proof)13:58
jmlcjwatson: well, that's already been done13:58
jml    suppress_subscription_notifications = BoolCol(13:59
jml        dbName='commercial', notNull=True,13:59
jml        default=False)13:59
jmlin my branch13:59
jmlnote that dbName is the old name.13:59
jmlbut how do I make something that works both before and after the 'commercial' column gets renamed to 'suppress_...'14:00
jmlstorm uses the dbName (somehow) to generate SQL14:00
wgrantjml: There's probably no feasible way to handle that in the app.14:05
wgrantjml: We've not done a column rename with fastdowntime before.14:05
wgrantI would personally duplicate the column on the table and use triggers to keep it up to date while the application is flipped to use the new name.14:05
wgrantRather than trying to get Storm to cope, which it won't.14:06
wgrant(unless you make suppress_subscription_notifications a property that executes manual SQL, rather than using Storm)14:07
sinzuiIt's take 1 hour to unsubscribe ~registry for linux/unity bugs reported between 2005 and 2006. We may have another 6 hours of bug mail going to ~registry14:07
wgrant(which might work in this case, since it's probably not used for filtering or anything)14:07
jmlwgrant: huh, you mean something like this:14:07
jml@property14:07
jmldef suppress...(self):14:08
jml  try:14:08
jml    return do_query('SELECT suppress_... FROM Archive WHERE id = %s' % self.id)14:08
jml  except ProgrammingError:14:08
jml  return do_query('SELECT commercial FROM Arch...' % ...)14:08
wgrantjml: Right14:08
jmlwgrant: interesting.14:08
wgrantjml: I changed SourcePackageRelease.copyright to use a similar manual SQL approach for performance reasons.14:09
wgrantBut it could also work well here.14:09
jmlwgrant: I have looked pretty thoroughly, and it's not used for WHERE clauses to the best of my knowledge.14:10
wgrantIt obviously doesn't work if the column is involved deeply in queries, but since you're probably only getting/setting it it should be OK14:10
wgrantRight, it wouldn't make much sense for it to be.14:10
jmlwgrant: I guess that will slow down code that uses the attribute, but maybe we can bear that for a little while.14:10
wgrantjml: By 1 query for about 48 hours.14:10
wgrantI think we can live.14:10
jmlwgrant: ok. I'll give that a shot. Thanks.14:12
wgrantjml: Great.14:13
* wgrant disappears14:13
czajkowskiwgrant: nn14:13
czajkowski15:39 < jcastro> czajkowski: do you remember the URL to add bug trackers to lp?14:42
czajkowskianyone help me out here?14:42
czajkowskigmb: ^^14:42
gmbczajkowski, https://bugs.launchpad.net/bugs/bugtrackers/+newbugtracker14:44
czajkowskigmb: thanks14:44
jmlwgrant: SourcePackageRelease.copyright defaults to Python's copyright if it's not provided as a keyword argument, I think.15:26
jmlhow do I get a cursor from a store object?15:45
jmlhmm. just cursor()15:46
jmlok.15:46
jmlwgrant, stub: https://code.launchpad.net/~jml/launchpad/archive-commercial-rename-support/+merge/10781916:01
jmlgmb also, ^^ (but I talked about it with them)16:01
* jml has to dash.16:01
gmbjml, k, thx.16:01
gmbbye16:02
gmb... can't believe I just did that.16:02
jmltee hee16:02
=== gmb changed the topic of #launchpad-dev to: http://dev.launchpad.net/ | On call reviewer: - | Firefighting: - | Critical bugs: 3.47*10^2
lifelessmorning18:13
LaneyAnyone fancy giving me some light test education? http://paste.ubuntu.com/1013802/22:02
Laney(AFAICT sourcepackage is a page such as https://launchpad.net/ubuntu/+source/mono)22:03
StevenKLaney: sourcepackage is a DistributionSourcePackage22:10
LaneyStevenK: yeah, I think that's what I linked to.22:11
Laneyso, assuming that it's right, can I cure the ForbiddenAttribute?22:11
Laneythen I'll get on to figuring out how to make it match the href :-)22:11
Laney(porting a doctest here)22:12
wgrantStevenK: Um22:12
wgrantStevenK: SourcePackage should be named Distro*Series*SourcePackage22:12
wgrantAh, but Distribution.getSourcePackage returns a DistributionSourcePackage, indeed.22:13
cjwatsonIn any case the forbidden attribute is probably because you're using LaunchpadFunctionalLayer (so including the security model) but your test doesn't log in.22:15
LaneyThe security model confuses me very much22:16
Laneyis there any documentation on it?22:16
cjwatsonDon't look at me, I zen it from the surroundings.22:16
cjwatsonAnd occasionally whine in a confused manner.22:17
wgrantWell22:17
cjwatsonLaunchpadZopelessLayer avoids the security model for cases where it doesn't matter, but (a) I'm never quite sure how evil it is and (b) I don't know whether it'll work in this case22:17
wgrantForbiddenAttribute isn't caused by an incorrect layer22:17
wgrantUnauthorized can be.22:17
cjwatson(Real LP devs will now tell me I'm on crack)22:17
wgrantForbiddenAttribute means you've used the wrong attribute name.22:17
StevenKLaney: Distribution.name does not exist.22:17
cjwatsonAh, doh22:17
cjwatsonLaney's test does not actually mention .name anywhere directly; presumably it's in some tested code22:18
StevenKSigh, I should learn to read.22:18
cjwatsonWait, Distribution.name *should* exist.  It's on IDistributionPublic.22:18
wgrantProbably trying to set it.22:18
wgrantWHich isn't allowed.22:19
wgrantIf the attribute is entirely unsettable, setting it will ForbiddenAttribute.22:19
Laneyit comes from the last line there22:19
Laneyview()22:19
wgrantThat is, if there's no permission that can possibly be held to grant write rights.22:19
wgrantLaney: What's the traceback?22:19
cjwatsonYou can figure out the security on any given attribute by looking at lib/lp/*/configure.zcml, sometimes in combination with lib/lp/security.py.22:19
Laneysec22:20
Laneywgrant: http://paste.ubuntu.com/1013837/22:20
Laney53 is the assertThat line22:20
wgrantjml: That column workaround is disappointingly unevil.22:20
cjwatsonMy queue API branch is getting to the point where it might arguably almost work.22:26
cjwatsonI might split it up, though, since some of the information about binary uploads is done by exporting bits of BPR and I suppose that might be contentious or something.22:27
wgrantcjwatson: Well22:28
wgrantcjwatson: Queue overrides are terrible.22:28
cjwatsonThe bit about exporting BPR isn't even so much for overrides, just for displaying information on builds.22:29
cjwatsonThe way I have it at the moment you'd do something like:22:30
cjwatsonfor build in upload.builds:  # probably only ever one of these but the PackageUpload design is weird22:30
cjwatson    for bpr in build.binary_packages:22:30
cjwatson        print(bpr.name, bpr.version)22:30
cjwatsonor whatever22:30
wgrantAh, yeah.22:31
cjwatsonI could probably land accept/reject in advance of any of this, though, which would be a start.22:31
cjwatsonBut I don't see a sensible way to export binary information without at least one new exported object, and BPR seems as good as any.  It's just that the asymmetry with SPR not being exported is a bit odd.22:32
wgrantI'd personally just ignore the hideous data model and add a method to retrieve a list of all override tuples for the upload, and another which takes a list of tuples to change them.22:32
cjwatsonI guess that's a possibility, though there's quite a lot in each tuple.22:32
cjwatsonIt feels better as a proper object so you can have named attributes.22:33
wgrantWe've deliberately avoided exporting BPR/SPR before.22:33
wgrantBecause security, URLs etc. are a bit of a problem.22:33
cjwatsonis_new, name, version, arch_tag, component, section, priority = override  # vomit22:33
cjwatsonURLs are only about as hard as for build, but yeah, not quite trivial.22:34
wgrantBuilds have a context.22:34
wgrantBPRs do not.22:34
cjwatsonBPRs have a build22:35
wgrantUgh, I guess.22:35
wgrantBut ew.22:35
wgrantAnyway22:35
cjwatsonIs it possible to create new objects just for export that don't correspond to anything much pre-existing in the internal data model?22:35
cjwatsonBasically the equivalent of a namedtuple22:36
wgrantThe fact that PU overrides are done by writing to BPR and SPR is an internal implementation embarassment that it would be nice to avoid exporting.22:36
wgrantIt's possible to do that, but there's a fair bit of code.22:36
wgranteg. DSP, SP aren't real.22:37
cjwatsonFWIW my current branch doesn't expose the writing part of that; I just went for overrideBinaries (which isn't lovely, but it fits reasonable CLIs well enough)22:37
cjwatsonPU.overrideBinaries that is22:37
cjwatsonSo a new exported interface and everything on it is a property?22:38
wgrantBasically.22:39
cjwatsonI could just add a load of properties to PackageUploadBuild and export that.22:39
cjwatsonSince it's there.22:39
StevenKPU is exported over the API?22:39
wgrantThat's another thing that probably shouldn't be exposed.22:39
wgrantPUB22:39
cjwatsonStevenK: Slightly, right now.  I'm working on extending it enough to be able to kill LP's queue tool.22:40
cjwatsonOh, PUB is wrong because it's one for the whole build, not one per binary in it.22:40
cjwatsonSo OK, PackageUploadBinaryAPIExportOnlyScrewYou or something22:41
wgrantAnother consideration is that API requests are slow, and some packages have a lot of binaries.22:41
wgranteg. overriding linux will take minutes over the API if you have separate objects for each binary.22:42
cjwatsonHm, true22:42
cjwatsonarch_tag is per-build, so it's only six elements per binary override, and I suppose that list hasn't changed in six years.22:43
cjwatsonBut ew, I hate unnamed tuples for this kind of thing.22:44
wgrantWell22:44
wgrantCould do list-of-dicts instead22:44
wgrantJSON doesn't do namedtuples, unfortunately.22:44
cjwatsonList of dicts might be OK.22:45
StevenKwgrant: I thought I could use setUpFields() to fiddle with the schema, but doing so causes KeyError in my tests.23:58

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!