/srv/irclogs.ubuntu.com/2015/09/24/#launchpad-dev.txt

cjwatsonwgrant: Is it worth me pushing up branches for Branch webhooks?  https://posthere.io/0e1d-4225-836c looks vaguely reasonable as a PoC00:38
cjwatsonVery easy on top of your work00:38
wgrantcjwatson: Branches are trivial, indeed.00:39
cjwatsonThought I'd see if I could get it to go00:39
wgrantWhat is it, like 10 lines of diff?00:39
wgrantPlus UI00:39
wgrantOh, schema.00:39
wgrantThinking about what the payload should look like, hmmm./00:40
cjwatson 11 files changed, 54 insertions(+), 10 deletions(-)00:40
cjwatsonwithout tests00:40
cjwatson(ok, a bit of that is local webhook proxy config)00:40
wgrantNot bad.00:40
wgrantcjwatson: git:push:0.1 has old and new as dicts, currently containing just the sha1 key.00:41
cjwatsonRight, they could perhaps reasonably become dicts with just "revision_id" keys.00:41
wgrantWe should probably retain consistency, which means changing one of them.00:41
wgrantI'm not fussed which.00:41
cjwatsonI prefer dicts over prefixes.00:42
wgrantGreat, I marginally prefer them too.00:42
cjwatsonThere's an extra level of dict in the git case, but that makes sense given it's a repository hook00:43
wgrantRight, exactly.00:43
cjwatsonhttps://posthere.io/0e1d-4225-836c updated00:46
wgrantFancy.00:47
wgrantDo we have revnos easily accessible at that point?00:47
wgrantI suspect not.00:47
cjwatsonWe might, we do have both the db_branch and bzr_branch00:48
cjwatsonI'm doing this from a TipChanged event00:48
wgrantEh, let's skip it for now.00:48
wgrantdb_branch isn't entirely trustworthy.00:48
wgrantAnd bzr_branch is wrong by that point.00:48
cjwatsonbzr_branch had better not be wrong, it's used to get the new revision ID00:49
wgrant(well, we could get the info out of bzr_branch in most cases, but not always and it'd always be slow)00:49
wgrantGet the new revision ID, but not the revno.00:49
wgrants/revno/old revno/00:49
cjwatsonWe get the old revision ID from db_branch00:49
wgrantAh true.00:49
wgrantHm00:50
cjwatsonTipChanged.old_tip_revision_id00:50
wgrantSo we could probably include revno reasonably.00:50
cjwatsonIt's a Revision query I think?00:50
wgrantYep, the number is BranchRevision.sequence00:50
cjwatsonOr is it Branch.revision_count00:50
wgrantNoooo00:50
wgrantBranchRevision.sequence is what you want, but you need to be prepared for it to either not be there or not be set.00:50
cjwatsonMaybe that's more trouble than it's worth, given that a reliable webhook should not use the revno00:51
cjwatson(If there's a race with a push --overwrite, the revno might mean something different by the time the other end runs)00:51
wgrantTrue.00:52
wgrantEasy to add later if we become convinced it's reasonable.00:52
cjwatsonVersioning the format was a good idea.00:52
wgrantWell, this wouldn't even require a version bump.00:53
wgrantYay for dicts.00:53
cjwatsonThe "Delivery management web UI" Asana subtask should be done now, right?00:54
wgrantEr yeah.00:54
cjwatsonWill push this stuff tomorrow.  I could probably attack the remaining subtasks there now that I've gone to the small effort of getting it all working locally ...00:55
cjwatsonDunno how much you have pending00:55
wgrantI just use an unrestricted squid in an LXC container for local testing.00:56
cjwatsonI deployed the spec but with a tweak to allow 10.0.0.0/800:56
cjwatsonWhich should perhaps go into devel/deploy00:56
wgrantIndeed.00:57
wgrantI meant to go back and make the delivery UI not suck now the infra is there, but have been distracted so far.00:57
cjwatsonAdding header/body details?00:58
cjwatsonError display is a bit basic too.00:58
wgrantAnd making the status clearer without expansion, and adding the status of the latest delivery to each row on +webhooks.00:59
wgrantAnd adding refresh capabilities, possibly via dropping the AJAX batchnav stuff and use the delivery API collection directly.00:59
* cjwatson nods01:00
cjwatsonRight, time to crash.  Just like buildbot.01:00
wgrantHeh01:01
wgrantNight01:01
=== G_ is now known as G
=== G is now known as 32NAAFIPE
=== 32NAAFIPE is now known as G
cjwatsonwgrant: https://code.launchpad.net/~cjwatson/launchpad/testfix-import-warnings/+merge/272228 if you have a sec11:40
cjwatsonsilly me ran bin/test -t archivesubscription rather than -t archive.\*subscription :-P11:41
cjwatsonActually I'll just self-review that, it's pretty obvious and it's in fact fixing a double-query that was previously present in the view (as shown by the decremented query count)11:46
wgrantIt is indeed quite obvious.11:55
blrmorning21:01
wgrantMorning.23:29

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