/srv/irclogs.ubuntu.com/2013/07/02/#launchpad-dev.txt

StevenKwgrant: So I hang myself with dispair over Django and its ORM, I've been poking at PackageDiff. I'm still tossing up if we write a PDJ and hook everything that way, or if I keep PackageDiff as it is and write a new class that pretends to be an IJobSource01:24
StevenKEr, so I don't hang myself, even01:24
johntronhow do i import a github repo? i see the page that says it's possible, but it doesn't actually say how: https://help.launchpad.net/Code/Imports01:38
johntronnvm01:38
* johntron is an idiot01:38
johntroni dunno if i'm just dense or not, but i can't figure this out. i want to create a source package recipe using this as a starting point: https://launchpad.net/~chris-lea/+archive/nginx-devel01:47
johntroni see that i can copy it, but don't know how to get the bzr repo checked out01:48
johntronmaybe i need to just download the .deb and create my own repo from that?01:48
jelmerjohntron: you'll need to download the source pakcage and create a branch from that03:05
jelmerfrom the debian/ directory there specficially03:05
johntronjelmer: thanks! i just found reprepo, so i'll probably just use that03:10
jelmerjohntron: ah, rather than a PPA?03:10
johntronwell, i don't want to give the impression that i'll be maintaining this...03:13
johntroni was just wanting to use PPA to build and distribute for me03:14
johntronso i can use puppet/chef/salt to provision easily03:14
StevenKwgrant: No opinions?03:47
StevenKwgrant: Oh, can't ArchivePurpose.DEBUG die horribly now?03:51
wgrantStevenK: Back, sorry.03:55
wgrantAh yes, I forgot to follow up to kill the enum value03:56
wgrantStevenK: I'd write a PDJ03:56
wgrantYou can possibly get away with just using the job table.03:56
StevenKwgrant: I'm writing my thoughts03:58
StevenKwgrant: http://pastebin.ubuntu.com/5835072/04:01
wgrant1) is right out, because you used the word "leverage"04:02
StevenKHaha04:02
wgrantPackageDiff.job to replace PackageDiff.status is an antipattern04:02
wgrantIt could supplement it, but it cannot replace it.04:02
StevenKwgrant: Currently, ISourcePackageRelease.package_diffs will show PENDING diffs, too04:02
wgrantThat's correct.04:03
StevenKI'm not sure if we care enough to preserve that behaviour.04:03
wgrantWe do04:03
wgrantWe don't particularly want duplicate diffs requested04:03
wgrantAnd it will confuse eg. +localpackagediffs04:04
StevenKSo we want PackageDiffJob.package_diff and PackageDiffJob.job, and we create a PackageDiff when the job is created04:04
StevenKAnd PackageDiff.status and its enum friend can die.04:05
wgrantI think you can probably get away with using Job.json_data04:05
wgrantOr whatever it is called04:05
wgrantReferential integrity is not an issue here04:05
wgrantThe job should just not do anything if the PackageDiff doesn't exist.04:05
wgrantSo no DB changes04:05
StevenKUntil status dies?04:05
wgrantHm?04:06
wgrantWhat do you mean?04:06
StevenKjson_data is not on Job itself, it's on the derived job classes, backing onto their own DB tables04:08
StevenKwgrant: If we're linking to Job to make use of Job.status, why does PackageDiff.status need to exist?04:09
wgrantStevenK: We're not linking to Job04:09
wgrantThe Job will be linked only be a reference in a JSON dict.04:09
wgrantAnd even if we were linking them formally, PackageDiff.status still needs to exist unless we want to break Launchpad04:10
StevenKIf we create PDJs (say), we can automatically fail the job if the SPR is udev04:10
wgrantNo04:10
wgrantBecause that bug will be fixed by the time this happens.04:11
wgrantI'm also not sure how that's relevant to this04:11
StevenKwgrant: We can't use Job itself04:11
StevenKwgrant: How does the death of PD.status break LP?04:12
wgrantWhy can't we use Job itself?04:12
wgrantWe may need to add a new JSON column to it04:12
wgrantBut I don't see why we can't use it04:12
wgrantStevenK: Because filtering by (SPR, status) across two tables is going to be very slow04:13
wgrantThink BPB, except not from 2005.04:13
StevenKThen we create PDJ?04:13
StevenKBleh, derived jobs don't have status directly04:14
wgrantCreate PDJ for what reason?04:14
StevenKI was thinking to make filtering easy but it still requires two tables04:15
wgrantEven if PDJ.status existed, it still provides no benefit04:16
wgrantWhy do that when you can just use PD.status?04:16
StevenKwgrant: So, we create Job.json_data, when a PD is requested we make a bare job that contains the PD id in json_data, and then we have a interface/model that grab the job, lookup the PD, perform the diff and set PD.status appropiately?04:18
wgrantUnless you can think of a benefit to having PDJ04:18
StevenKNot having PDJ means it's different to any other job via process-job-source ?04:19
wgrantI mean in the database04:19
wgrantprocess-job-source has no idea about the database layout04:19
wgrantCode changes within Launchpad are cheap04:19
wgrantThey can easily be changed with an hour's notice04:20
wgrantA PDJ table provides no benefit, apart from a foreign key reference, and I would argue that that is not a benefit.04:20
wgrantAnd it pushes us ever closer to 300 tables04:20
wgrantIf you follow the "everything needs a foreign key" approach then you end up needing a separate table for every distinct set of classes that participate in a job04:21
StevenKWe can't destroy hwdb and kill 16 tables?04:22
wgrantI haven't spoken to HWE/cert04:22
wgrantlately04:22
wgrantEven so04:23
wgranta PDJ table provides no benefit other than an FK04:23
wgrantFK is not a notable benefit04:23
wgrant=> PDJ is a net negative04:23
wgrant=> no PDJ table04:23
wgrantYou still need a DB change this time.04:23
wgrantBut only this time.04:23
StevenKSo, the plan I outlined is fine?04:23
wgrantYes04:23
wgrantIt's effectively a schemaless rabbitmq job that happens to also be persisted in the database, because we don't have a rabbitmq HA story today.04:24
wgrantJob.json_data gives us jobs that are almost as lightweight as everyone else who is using celery without the HA concerns.04:25
StevenKwgrant: I accidently ArchivePurpose.DEBUG, I'm going to self-approve and land.04:28
wgrantk04:28
* wgrant ginas saucy06:02
=== tasdomas_afk is now known as tasdomas
=== wedgwood_away is now known as wedgwood
cjwatsonHas anyone had a chance to consider https://code.launchpad.net/~cjwatson/launchpad/copy-set-phase/+merge/170775 ?17:02
=== tasdomas is now known as tasdomas_afk
=== wedgwood is now known as wedgwood_away

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