/srv/irclogs.ubuntu.com/2011/06/02/#ubuntuone.txt

ralsinamorning...07:34
mandelmorning all07:49
ralsinagood morning mandel07:52
mandelralsina: buenas :)07:52
mandellets see how the day goes today...07:53
* ralsina da golpe en el hombro07:53
mandel:)07:55
ralsinamandel: is the canonical IRC server working for you?08:01
ralsinataking a short coffe break, will be back in 30 minutes or so08:30
mandelralsina: it does work for me09:03
ralsinablah, my quasselcore had become stuck09:03
ralsinathe crappy sftware only worked for 2 months without crashing!09:04
mandelralsina: hehe that is the new idea for server code, 2 montsh is good enough ;)09:05
ralsinaon web, sure, since if you have not re-deployed for2 months, your company has probably died ;-)09:06
kazadehey guys, I think I've done something a bit foolish with Ubuntu one, I'm just wondering, do you guys keep backups for any period of time in case something goes wrong?09:20
mandelkazade: what has happened?09:20
mandelralsina: can you reiew: https://code.launchpad.net/~mandel/ubuntuone-control-panel/use_correct_reactor/+merge/6296109:21
ralsinamandel: sure09:21
kazademandel, well, I had ~30G of pictures in my storage, and the other day I reinstalled my laptop and decided I didn't need them on my laptop, so I unticked "Sync this folder"....09:21
kazadethat didn't do what I thought it did09:22
kazadeI thought it just wouldn't download that folder to my laptop, but apparently it removes it from U1 completely09:22
mandelkazade: well there is a way to recomber the files, but I dont have such a super power09:22
kazadenow I'm hoping I have those pictures on my desktop, but in the worst case is there any way back09:22
ralsinamandel: isn't that a conflict in line 30?09:22
mandelralsina: let me check09:23
mandelkazade: try to see if you have them in your desktop and to be super save, start it with no internet connection09:23
mandelkazade: if you don't have them, pop here and ask for help and we will point you to the person with the super powers ;)09:24
kazadeok, thanks mandel09:24
kazadeis there a way to stop a certain folder downloading on one PC?09:24
kazadeI mean, I want the Ubuntu One folder on my work laptop, but not my pictures09:24
mandelkazade: yes, you can move the pict out of the 'Ubuntu One' folder and tell them to sync as a diff folder09:25
mandelthen tell the app not to sync that udf (User Defined Folder)09:25
mandelralsina: weird, I though there were no merge issues, let me fix it09:25
ralsinamandel: ok09:26
kazademandel, that's what I tried to do... I had ~/Pictures sharing as well as ~/Ubuntu One. I unticked "sync" on my laptop and it removed it totally from U109:29
mandelkazade: strange… ralsina that ^ is the correct way to do it right?09:30
ralsinayes, that should not remove it09:30
kazadehmm, well it's definitely not there now :(09:31
kazademandel, do you know how long U1 keeps backups for?09:34
mandelkazade: no idea, but I can find out, one sec :)09:35
mandelralsina: can you run the test in ubuntone-control-panel like this: ./runtests -qt09:52
mandelralsina: I think thee is a broken test in trunk09:52
ralsinamandel: run them in trunk? Sure09:52
mandelralsina: yes, trunk it is, there is a failing test in my system09:52
mandeland I'm sure I'm up to date with everything09:53
ralsinamandel: ok, let me check09:53
ralsinayep, there is one failing test09:55
ralsinabut that's a knwn problem in devtools that dobey is trying to fix09:55
ralsinamandel: you get the one with REQUEST_NAME_REPLY_EXISTS right? That is the known one.09:56
kazademandel, I don't suppose you could point me to that person with super restore powers?09:56
kazadeI'm fairly sure that even if I do have them at home, I don't have all of them09:56
mandelkazade: I can, but he is in the US so you will have to wait a little, is that ok?09:57
kazademandel, sure09:57
mandelkazade: the person to ask is joshuahoover09:57
ralsinakazade: he should be around in 3 or 4 hours09:58
kazadeok thanks guys09:58
mandelnp09:58
* kazade is bricking it09:58
kazademy girlfriend will kill me if those pictures go missing!09:58
mandelkazade: he, girlfriends… you dont want to get in trouble with them ;)09:59
mandelralsina: I have fixed the merge issue: https://code.launchpad.net/~mandel/ubuntuone-control-panel/use_correct_reactor/+merge/6296110:00
mandelralsina: I;l move to make the ui run on windows and later we can see what to do next10:01
ralsinamandel: I am going to take a long break in a few minutes and come back in 4 hours or so10:01
mandelralsina: ok, np, I'll be here working and then will walk the dog and exercise a little10:02
mandel:)10:02
ralsinacool then10:02
ralsinamandel: I will run the tests on this one, though10:03
=== zyga-afk is now known as zyga
mandelralsina: cool10:07
ralsinamandel: tests pass except the one we expect to fail, code looks good, so +1 from me10:07
mandelralsina: ok, alecu will take a look at it later10:08
ralsinaoh, mine, my folders is showing actual information :-D10:08
ralsinaand the connect button works!10:10
duanedesignmorning all10:12
faganmorning10:13
duanedesignfacundobatista: was just looking at bug 786189 . I noticed you had commented on similar bugs in the past. Is this likely a problem with bad metadata?12:11
ubot4`Launchpad bug 786189 in ubuntuone-client (Ubuntu) "Ubuntu-One on 10.04 Netbook Edition will not sync from server to netbook (affects: 1) (heat: 498)" [Undecided,New] https://launchpad.net/bugs/78618912:11
facundobatistaduanedesign, let me see...12:30
facundobatistaduanedesign, yes, this is very ugly: 'is_directory': 'T', 'changed': 'LOCAL',12:32
nessitahello everyone!12:35
Prettoany ubuntuone devel here to help with one question about the UI?12:42
faganPretto: fire away12:44
Prettofagan: I looked for the code that changes the buttons in control center, but couldn't find12:45
alecuhello Ubuntu One!12:45
faganPretto: nessita can probably help with that12:45
faganhey alecu12:46
nessitahi alecu!12:46
nessitaPretto: hi there, how can I help? meaning, what do you want to do with the buttons (and which ones?)?12:46
alecunessita, btw... can you review this branch again? https://code.launchpad.net/~alecu/ubuntuone-control-panel/tx-web-client/+merge/6288912:46
nessitaalecu: sure!12:46
alecurthanks!12:47
facundobatistaHola nessita, alecu12:48
alecuhola facu12:48
nessitahola facundobatista! what a pleasure seeing you around12:49
facundobatistanessita, that's because I finally took a shower?12:49
nessitait was about time!12:50
nessitaalecu:  there is a couple of needs fixing, when you fix those I'll test it IRL13:31
alecunessita, thanks for the comments; looking now.13:33
ralsinagood evening folks!13:46
nessitahi ralsina13:46
alecunessita, I certainly forgot the "twisted.internet.base.DelayedCall.debug" in there. But perhaps we could have u1trial set it before running. Or setting it as a cmdline option.13:47
nessitaalecu: makes sense13:47
nessitacan it be set from command line?13:47
dobeymandel, ralsina: the NAME_EXISTS issue should be fixed in nightlies now13:49
ralsinadobey: cool!13:49
nessitadobey: yey!13:49
ralsinaOMG, it's standup time in 10'!13:50
ralsinadobey: was it as hard as it seemed to be yesterday?13:50
dobeyralsina: well, was mostly fixed on tuesday. and the twisted issues aren't properly fixed. just worked around. will be insanely hard to fix them :-/13:52
ralsinadobey: fixing for the tests an incredibly hard issue that doesn't show up in the real usage makes no sense13:52
ralsinaThen again, I was fully grown up before being exposed to TDD so I have a strong immune response ;-)13:53
* nessita gets scared by ralsina's comment13:54
ralsinaSee? ;-)13:54
* ralsina is on epater le bourgueoise mode13:54
alecuhere's bug 79183413:54
ubot4`Launchpad bug 791834 in ubuntuone-dev-tools "Add an option to enable DelayedCall.debug (affects: 1) (heat: 6)" [Undecided,New] https://launchpad.net/bugs/79183413:54
dobeyheh13:54
* fagan doesnt know what that means13:54
nessitaralsina: I kinda agree on balancing the efforts regarding production code vs test development, but we need a sane running test suite to be able to throw new code in the "street" (cd, whatever)13:55
dobeyit's the triptophan13:55
faganralsina: I fixed the bug other than breaking the tests13:55
ralsinafagan: "scare the burgeois"13:55
nessitadamn, is cool here!13:55
faganralsina: hah13:55
dobeyi really don't like the 'version' property in NM13:56
ralsinaWhat's scary is that I mistyped it in french13:56
dobeyi mean, i like that it's there13:56
fagandobey: well its kinda needed13:56
dobeybut the fact that it's the version of NM itself, and not the API, is totally f'n broken13:56
ralsinadobey: version number comparison is one of those things that work based on good faith and pixie dust13:57
ralsinaNM is not convinced it's a system service13:57
dobeyNM is convinced it's a system service. and it's API is a "free desktop standard"13:57
ralsinadobey: that's their words talking. If their brains thought that, they would number APIs13:58
nessitafagan: did you fix your branch?13:58
ralsinaas in "numbered standard versions" that some NM version implements13:58
fagannessita: working on it did some reading first13:58
fagannessita: will have it by the end of the day13:59
nessitafagan: nice!13:59
faganim supprised it didnt take me longer to actually get a working version13:59
alecuSTANDUP!!!!!!14:00
alecume14:00
faganme14:00
nessitame14:00
thisfredme14:00
nessitaralsina, dobey?14:00
ralsiname14:00
nessitaralsina: mandel is not coming, right?14:00
dobeymeh14:00
ralsinamandel was here earlier but I don't know14:00
nessitaalecu: go!14:00
alecuDONE: pushed fixed webclient branch; worked on devices tab branch14:00
alecuTODO: more fix for the webclient branch; push the devices tab; try to make the u1cp run on windows14:00
alecuBLOCKED: no14:00
alecuNOTE: tomorrow I'll be offline while travelling to london14:00
alecuLOVE: london on spring14:00
alecuHATE: travelling 13hs14:00
alecuNEXT! nessita14:00
nessitaDONE: done listing and browsing of cloud folders, reviews14:00
nessitaTODO: provide subscription functionality, reviews14:00
nessitaBLOCKED: nopes14:00
nessitaNEXT: fagan14:00
nessitaNOTES: I will be taking an longer slot for lunch today (1.5 hr instead of the usual 0.5)14:00
faganDONE14:00
fagan* Fixed the nm bug in my branch but was missing tests14:00
fagan* read up on mocker14:00
faganBlocked14:01
fagan* nope14:01
fagannext thisfred ?14:01
thisfredDONE: Bug #665024 (packaged new erlang and put it in nightlies)14:01
thisfredTODO: See if ^ solves the bug, and if so, start SRU process14:01
thisfredBLOCKED: No14:01
thisfredNEXT: nessita14:01
ubot4`Launchpad bug 665024 in erlang (Ubuntu) (and 3 other projects) "Desktopcouch doesn't replicate with json_encode error 500 (affects: 9) (dups: 2) (heat: 52)" [High,Confirmed] https://launchpad.net/bugs/66502414:01
thisfredeh, next: dobey, I guess14:01
nessitanopes, ralsina14:01
nessita:-)14:01
ralsinaDONE: not a lot yet, complicated day :-( some reviews, updating installer screens with current texts14:01
thisfredwell, we're not really following the order anyway ;)14:01
ralsinaTODO: finish that, reviews, talk to lots of people, ping design, etc14:01
ralsinaBLOCKED: by my stomach, don't ask14:01
ralsinadobey?14:02
faganewww14:02
dobeywe take it in turn, to act as sort of governer for the week?14:02
dobeyλ DONE: bug #789299 (part 2)14:02
dobeyλ TODO: bug #789300, bug #771488, expenses14:02
ubot4`Launchpad bug 789299 in ubuntuone-dev-tools "DBusTestCase sometimes connects to real session bus (affects: 1) (heat: 6)" [Critical,Fix committed] https://launchpad.net/bugs/78929914:02
ubot4`Launchpad bug 789300 in ubuntuone-dev-tools "DBusTestCase needs to work with Qt main loop as well (affects: 1) (heat: 6)" [Critical,In progress] https://launchpad.net/bugs/78930014:02
ubot4`Launchpad bug 771488 in ubuntuone-dev-tools "u1trial should unset GTK_MODULES (affects: 1) (heat: 4)" [Medium,In progress] https://launchpad.net/bugs/77148814:02
nessitaralsina: are you taking tomorrow off like you suggested you might?14:02
* fagan gets onto that bug 14:03
=== kenvandine_ is now known as kenvandine
ralsinanessita: probably not14:04
mandelsorry, went for kunch14:05
mandellunch*14:05
fagankunch is a lot nicer than lunch14:05
nessitamandel: go!14:06
fagankarate + lunch > all other forms of eating14:06
mandelDONE: Fixed ling issues in creds branch. Updated correct reactor usage for control panel. Started working on getting the UI to run on Windows.14:06
mandelTODO: Some more control panel.14:06
mandelBLOCKED: no, but have some personal stuff bothering me later...14:07
nessitamandel: question, is there any plan on communicating syncdaemon with the control panel? I'm not sure if that's what you're working on from your standup DONE :-)14:08
nessitaoops14:08
nessitabye mandel14:08
ralsinawelcome back mandel :-)14:09
ralsinaThose second-world internet connections... tsk tsk ;-)14:09
mandelralsina: sorry I went or lunch and forgot to check the watch14:09
nessitamandel: question, is there any plan on communicating syncdaemon with the control panel? I'm not sure if that's what you're working on from your standup DONE :-)14:12
mandelnessita: working on it14:12
nessitamandel: AWESOME14:12
mandelnessita: I need to create a sdtool so that we can reuse most of the code14:12
nessitamandel: let me know if you need assistance with that, is extremely similar to the CredentialsManagementTool14:13
mandelok14:13
alecunessita, pushed fixes on https://code.launchpad.net/~alecu/ubuntuone-control-panel/tx-web-client/+merge/6288914:16
nessitaon it!14:16
=== m_conley_away is now known as m_conley
faganHmmmmm the logic for that version check is a little tricky14:27
faganoh it would be easier to check if its lower than the version14:28
ralsinafagan: which version numbers are involved?14:29
nessitadobey: so, I don't wanna be a party pooper but I'm still getting14:30
nessita    self.assertNotEqual(name, dbus.bus.REQUEST_NAME_REPLY_EXISTS)14:30
nessitatwisted.trial.unittest.FailTest: dbus.UInt32(3L) == 314:30
nessitawhen running -qt tests in the control panel. I'm running u1-dev-tools 0.1.3+r34-10~natty114:30
faganralsina: well I asked and its supposed to be anything below 0.8.99*14:30
faganralsina: ill check whats in natty too14:30
* alecu gets the REQUEST_NAME_REPLY_EXISTS too14:31
ralsinaThere *is* a distutils.version that you can use to compare those things but I am not sure we want to have that as a dependency14:31
ralsinafagan: 0.8.99????? why not make the new API 0.9? Blargh.14:31
faganralsina: yeah thats why I was confused for a time yesterday on how to do it14:31
faganif it was 0.9+ I would have just went string.split(".") and went if version[1]>814:32
ralsinafagan: no, that fails for 1.014:32
ralsinayou *always* need to check all parts, left to right14:33
ralsinait's just that this way you need to check three instead of 2 ;-)14:33
faganralsina: good point14:33
nessitaalecu: is the 39% in use faked or real?14:33
nessita"39% in use"14:33
alecunessita, faked14:34
ralsinaalso, when you split, keep in mind that you may have 2 or 3 parts in the version. It's not trivial, but you can do it ;-)14:34
alecuralsina, fagan: compare tuples14:34
nessitaalecu: ah, makes sense now14:34
ralsinaalecu: better, split and zip()14:34
nessitaalecu: approved!14:35
alecunessita, cool!!!! thanks14:35
faganalecu: why would a tuple be more useful than a list in this case?14:35
* fagan doesnt really see the big difference 14:35
ralsinafagan, check what you get by doing zip(version1.split('.'), version2.split('.'))14:36
alecufagan, for this case, there's no difference between a tuple and a list. Usually it does.14:36
ralsinafagan: check the behaviour of the "<" operator between tuples.14:36
ralsinabut yes a list is the same thing14:37
ralsinabut split returns tuples14:37
nessitathisfred: hey there! are you arriving to heathrow?14:37
thisfrednessita: yep14:37
nessitathisfred: shall we get together to go to the hotel? I land at 10:05, and your flight lands at 9:3514:37
nessitathisfred: I will travel only with carry on, so I will not have luggage  time wait14:38
faganralsina: I always get confused between tuples and lists when that kind of thing comes into play14:38
* fagan is arriving at standsted14:38
thisfrednessita: sure. I was thinking of taking the underground all the way. Do you have an oyster card?14:38
dobeynessita: huh14:39
alecuralsina, I think split returns lists14:39
nessitathisfred: I do. Though beuno recommends heavily the heathrow express + underground. Last year I took only underground and it was a loooong trip (but completly doable)14:39
nessitadobey: yeah :-(14:39
thisfredralsina: huh? I thought split returned lists14:40
alecunessita, thisfred: +1 to the heathrow express.14:40
nessitakarni: hey, you're arriving at 9:35 to Heathrow as well?14:40
ralsinathisfred: you are right! What was I thinking?14:41
thisfrednessita: well, it takes about an hour  the heathrow express shaves off maybe 20 minutes tops, considering that we'd have to get on the underground after anyway and change14:41
alecuralsina, thinking about tuples?14:41
ralsinayes, take the express. It takes 15 minutes instead of 4514:41
alecuplus lovely views14:41
nessitathisfred: ^ that's what everybody says14:41
thisfrednessita: but ok, let's take the express :)14:41
ralsinathisfred: the express took about 15 minutes for me last month :-)14:41
nessitahehehe14:41
dobeyhrmm14:41
ralsinathisfred: and has wifi. And coffee14:42
nessitathisfred: I never had it, so I wanted to try it to see why everyone is so in love with it14:42
alecuwifi!14:42
ralsinaand coffee!14:42
thisfrednessita: I took it on the way back once when I was in a hurry14:42
alecuoh, btw: what simcard should I get while on london?14:42
thisfrednessita: where do you propose we meet?14:42
ralsinaof course, if you convert the cost to pesos, you want a massage and a donut, too.14:42
karninessita: 9:35, no idea where hahaha, I'm way to busy coding these days lol! :)14:42
ralsinaalecu: I got a vodafone for 1 week with 500MB of data for 10 quid14:42
karninessita: you too?14:43
dobeynessita: the error happens in cp trunk with --reactor=qt --gui?14:43
alecuralsina, the kind of chocolate donut that usually comes included with massages?14:43
nessitakarni: thisfred too, I'm arriving at 10:05, so I was proposing we can meet to go to the hotel together14:43
nessitathisfred: no idea, any suggestion?14:43
nessitadobey: ./run-tests -qt for me14:43
ralsinaalecu: I don't know where you are getting your massages but I like the attitude ;-)14:43
karninessita: thisfred: definitely!14:44
nessitathisfred: near the Heatrow express "door" (if such thing exists)14:44
thisfrednessita: which terminals are we arriving at?14:44
nessitathisfred: let me check mine14:44
dobeyok14:44
nessitathisfred, karni: I'm arriving to Terminal 314:45
alecuralsina, did you get that vodafone sim somewhere special? like a kiosk or some vodafone shop or something?14:45
ralsinaOMFG, they are playing "Hasta siempre comandante" on the bar's speakers. That's just weird.14:45
ralsinaalecu: vodafone shop14:45
karninessita: thisfred: I'm terminal 114:45
alecucool14:45
ralsinaalecu: they are everywhere14:45
thisfrednessita: I'm in terminal 514:45
nessitabu!14:45
thisfrednessita: so we'd all have to get on at different stops14:45
nessitaright14:45
karninessita: I would use these 15 minutes to start travelling to terminal 3, if that's on the way to the hotel :D14:46
thisfrednessita: which makes it less practical14:46
alecucool14:46
nessitayeah. Then maybe we can meet in the hotel14:46
thisfrednessita: those terminals are not close14:46
karniok14:46
* nessita drops friendly plans14:46
karni:(14:46
* karni hugs nessita 14:46
nessitathisfred: right... I didn't consider terminals14:46
* nessita hugs back, and cries14:46
thisfrednessita: yeah: I will check in and wait for you guys in the lobby, and we can go out and do something fun?14:47
nessitaSHOPPING to LILLY WHITES14:47
thisfredfine by me :)14:47
nessitahttp://en.wikipedia.org/wiki/Lillywhites14:47
thisfredI need to get my wife a birthday present14:47
thisfredah probably not from there :)14:47
nessitaI'm hoping Lilly Whites is fulled with sales, I need tons of sport clothes14:47
nessitathisfred: well, we can go another places too14:48
ralsinayou know, there is ONE express. You would at worst be on different cars and meet at the end14:48
thisfredbut we can go on a shopping spree14:48
thisfredand maybe a museum14:48
thisfredHaven't been to the tate modern in a while14:48
* thisfred will wait in the lobby for nessita and karni14:49
karnithisfred: nessita: cool :)14:49
* nessita acks14:49
thisfredkarni: I am tallish, very short hair.14:49
* karni note to self: save nessita's and thisfred's mobile phones14:50
karnithisfred: hah! I'm the same :D14:50
thisfredmine won't work in the UK14:50
thisfredI'm sure we can pick out the geeks ;)14:50
karnithisfred: my pic is in the directory already, though I might be not shaved this time xD14:50
karnithisfred: heheheh14:50
nessitakarni: I will have mine turned off, so don't bother14:50
thisfredsame here14:50
karnihahahah you people :)14:50
dobeybrb14:50
* thisfred checks directory14:50
nessitabrb14:51
faganok I think I have the logic14:52
faganhttp://paste.ubuntu.com/616761/14:52
faganbut that is going by the presumption that they are going right for 0.9 after this release of nm14:53
faganactually thats a little wrong too :/14:54
ralsinafagan: don't do it that way then ;-)14:54
thisfred!= True is better written as not14:55
ralsinafagan: make a list of possible version numbers prior and later and see that your code works the right way with all of them.14:55
ralsinaas in "and not foo.startswith(bar)"14:55
thisfredhuh? "Your edit request has been forwarded to #ubuntu-irc.  Thank you for your attention to detail"14:55
faganralsina: yeah the logic is a little bit tricky14:55
faganralsina: oh and the != True is me just coming from C14:56
ralsinafagan: if it were easy, it would be done by computers.14:56
dobeywtf14:57
faganralsina: im going at it a little bit differently just to make it easier on myself14:58
thisfredfagan also you're still using < with strings, which does not do what you want14:58
dobeyi guess freenode doesn't like our standup14:58
karninessita: thisfred: I think it's a good idea to add the arrival terminal info on the wiki. Just added 'T1' in my row, so other ppl know.14:58
dobeysigh14:58
faganthisfred: well I could go int(version[]) I suppose14:59
ralsinafagan: on what exactly are you going at it a little bit different? Not about trying it with different version numbers, I hope.14:59
faganralsina: no no im just doing the logic a little bit differently because of the weird numbers14:59
faganralsina: just changing to a nested if14:59
ralsinafagan: ok, if it makes more sense to you, that's fine15:00
thisfredfagan: NM uses these in their versions? http://en.wikipedia.org/wiki/Weird_number :P15:00
faganthisfred: yeah15:00
dobeyfagan: write a function which takes two strings as input, write several tests that pass different strings in, and check for appropriate output, that all fail; then make the tests pass by fixing the function15:00
ralsinathisfred: never heard of weird numbers before. I am way behind in discrete math, it seems :-)15:00
ralsinafagan: what dobey said15:01
thisfredanyone remember which days of UDS we had to buy our own dinner?15:05
thisfredtue - wed - thu ?15:05
thisfredI know it was 315:05
dobeythisfred: yes, monday and friday were pre-arranged15:07
thisfredthx15:07
faganok now its good15:09
faganim very sure of it15:09
faganjust going to test it now15:09
dobeyman, qtreactor is full of broke15:09
dobeyhow the hell are we going to package it?15:10
=== rodrigo__ is now known as rodrigo_
dobeynessita: oh right; those tests weren't getting run otherwise. meh15:11
dobeysigh, something is killing stdout/stderr too15:15
nessitadobey: can I help?15:15
faganok fixed http://paste.ubuntu.com/616772/ and working15:16
nessitakarni: I added mine too15:16
fagannow on to the tests if there isnt anything wrong with the way I did that there15:16
ralsinacouldn't we just ship a private copy of qtreactor? It's a single file...15:16
dobeynot sure; uno momento15:16
dobeyralsina: no; we should package it properly in ubuntu if we're goint to use it15:17
ralsinafagan: what happens with 0.515:17
faganralsina: it works because it is auto false15:17
faganralsina: I tried out a few different values in the python shell and it worked ok15:17
ralsinafagan: you don't seem to be getting the idea of automated testing15:18
mandelralsina: I'm leaving for a couple of hours, will be back later15:18
mandel!15:18
faganralsina: well I havent fixed the tests yet15:18
ralsinafagan: since you just "tried things on the shell" we don't see what you tried15:18
karninessita: \m/15:18
faganralsina: ill fix them and then be able to say that its working fine15:19
ralsinafagan: nope15:19
faganfix the tests then the logic?15:19
ralsinafagan: there are two parts to a god test. 1) it hould fail before the fix 2) it should work after the fix15:19
ralsinaand hopefully, writing the code to fix it was step 1.5 ;-)15:19
faganoh ok so then I should probably have run the tests a bit more and fixed them as I went along15:20
ralsinain this case, you should create a "check_nm_version function (or whatever) and you should write tests for it with different version numbers, and they all should be somewhere we can see them for review15:20
faganralsina: ok thats easy enough to do15:20
dobeyralsina: wouldn't a god test be a logical fallacy?15:21
fagandobey: hahaha15:21
ralsinas/god/mohammed/ ;-)15:21
fagandobey: isnt the god test throwing a rock into the air and if it hits you then god obviously was getting retaliation15:22
ralsinafagan: that way, you make sure your function works correctly. After that, you use it to fix the app code15:22
* dobey hands fagan a rock to go throw up in the air15:22
dobeymust be thrown directly vertical and you must not move15:23
dobeyralsina: why don't people listen to me? :)15:23
ralsinadobey: what? ;-)15:24
dobeywriting tests :)15:24
ralsinawhat????! ;-)15:25
ralsinasorry, stupid joke ;-)15:25
dobeyi think you need a hearing aid; you're getting old ;)15:25
ralsinadobey: yes, I can hardly hear what you type. Type louder! ;-)15:25
dobeyheh15:26
dobeyCLICK CLACK CLICK CLACK!15:26
ralsinaOr, use a type M keyboard! ;-)15:26
ralsinaok, time for a short break to go back to the house. See you all in half an hour or so15:28
dobeyok wtf15:28
dobeyi put sys.exit(1) inside a test15:28
dobeyerr, inside the setUp() even15:28
dobeyand it doesn't exit!15:28
nessitaralsina: ack15:28
dobeyand sys.stderr.write() isn't printing my message!15:28
dobeywhy are we using qt again? :(15:28
nessitadobey: I know your feeling15:29
fagannice its working with the method15:29
faganbrb getting tea15:29
dobeyfagan: if "the method" is that thing you pastebinned last, it's not working.15:32
dobeywhat the hell15:33
dobeyoh15:35
dobeyffs15:35
dobeya) i'm an idiot15:35
fagandobey: no no no I mean I made a method out of that code (that is working in 11.10 but not tested yet on 11.04)15:37
dobeyb) twisted is the worst thing ever.15:37
dobeyfagan: and i mean, if your method simply uses that check you use in that pastebin, it doesn't work; whether or not it appears to for you15:38
fagandobey: well I fiddled with the logic again since but it does work15:39
faganoh crap missed 1 little bit15:40
dobey"pass the tests fagan is doing by hand" != "work"15:43
fagandobey: I forgot == 0 because im used to C where if its 0 its false15:43
fagandobey: well I did debug it pretty heavily to make sure the logic was working as i should15:44
fagan(and just an intern and first proper development job and first branch to do...)15:44
nessitaalecu: ping15:57
alecunessita, pong15:58
nessitaalecu: not sure how I miss this in the review, but when running trunk I'm getting an AttributeError from the account code your branch added: http://pastebin.ubuntu.com/616800/15:58
aleculet's see...15:58
alecunessita, weird!15:59
nessitaright!15:59
nessitamaybe something wasn't merge? not sure15:59
nessitaI'm re branching to see if it happens again15:59
nessitaalecu: ah! maybe my build was old!16:00
nessitaalecu: is very likely, I don't run build often there16:00
nessitaalecu: yeap, my bad... sorry16:01
alecunessita, oh, a missing ./setup.py build ?16:01
nessitaalecu: yes :-( I'm not used to it16:01
alecuno prob :-)16:01
nessitaI will get used to it...16:01
alecunessita, me neither. It has already bitten me a few times.16:01
dobeywell i *THOUGHT* i had this stuff working well enough16:02
dobeybut twisted hath proved that wrong :(16:02
alecunessita, I think the best solution is to have a script to run the cp that builds first.16:02
nessitaalecu: not sure about that...16:02
nessitamaybe? can't tell16:02
nessitadobey: shoot16:02
dobeyexceptions.AttributeError: 'SSOClientTestCase' object has no attribute 'bus'16:03
nessitadobey: are you calling super for every single parent when dealing with multiple inheritance?16:03
nessitadobey: if you inherit from 2 classes, you need to call setUp for boths16:03
nessita(when you redefine a method)16:04
nessitaif you don't redefine the method, first is called the setUP from the first parent class, then from the second, etc16:04
dobeythere is no MI involved here16:05
faganHmmm I dont know how to fix the tests16:07
nessitadobey: you sure? SSOClientTestCase inherits from the DBusTestCase16:07
faganralsina: im almost done for the day so it looks like im not going to fix it before EOD. Would you mind setting aside a little time tomorrow to walk me through what I have to do for the tests and all that. I read up on mocker but still not in practice so im a little lost on what to do16:09
dobeyhrmm16:10
dobeyok, needed a couple of yields16:11
dobeybut now, other broken tests16:11
dobeynessita: http://pastebin.ubuntu.com/616814/ <- now getting these with ./run-tests -qt after my fixes16:13
nessitachecking16:14
dobeyhttp://pastebin.ubuntu.com/616816/ <- my current diff16:14
nessitadobey: that's very odd, "twisted.trial.unittest.FailTest: did not catch an error, instead got dbus.String(u'Ubuntu One')" means that we're explicitly testing for a error signal and we're not getting one16:15
nessitadobey: what did you change in your end?16:15
nessitadobey: smells like the faked dbus backend is not in place16:16
dobeynessita: maybe; but i'm surprised these tests were actually working at all :-/16:16
nessitadobey: why?16:16
nessitadobey: I have checked them and write some of them, as far as I remember they looked correct16:17
dobeynessita: i'm also getting some errors with just ./run-tests now too, about no .service file for SSO16:17
nessitadobey: that indicates that you're trying to run the real SSO, somehow?16:17
nessitadobey: what test suite are you running? ussoc or u1cp?16:17
dobeyu1cp16:18
nessitadobey: what devtools branch are you running? so I can reproduce locally16:18
dobeynessita: installed nightlies is what i'm using16:19
nessitaguh16:19
nessitadobey:did you do any modification to u1cp or is plain trunk?16:19
dobeynessita: the diff i pastebinned are the changes to u1cp16:19
nessitaah, missed that, looking16:19
nessitadobey: I'm finishing a branch up, as soon as I push it for review I'll grab that and work it out16:21
dobeyok16:21
alecuralsina, are we meeting today?16:22
ralsinafagan: sure thing. I didn't expect it to take you less than 3 or 4 days ;-)16:23
ralsinaalecu:  you mean the weekly team meeting? I am not really up to mumble from here (son taking nap)16:24
alecuralsina, yes, the weekly team meeting... but it probably makes no sense since we are all meeting on monday anyway.16:25
ralsinaalecu: yeah16:26
ralsinawe'll start having them next week, I promise16:26
faganralsina: well im 90% sure I have the logic correct but the tests would make sure of that16:26
faganralsina: thats why id like to do it :)16:27
ralsinafagan: that's the whole idea :-)16:27
faganralsina: anyway ping me in the morning when you are free16:27
faganill take a look at it and see what I can do for the like half hour I have left16:28
ralsinafagan: ok, will do16:28
fagancool16:29
dobeywhat a mess these imports are16:34
karnifagan: where do UDFs show up on Windows?16:40
karnifagan: in My documents directly?16:40
fagankarni: UDFs?16:42
karnifagan: User Defined Folder = Cloud folder16:42
faganah ok16:42
dobeykarni: under the profile directory16:42
karnithe obvious-obvious folder in the cloud ;)16:42
fagankarni: what dobey said16:42
karnidobey: thanks16:42
dobeykarni: iow, under the home :)16:42
karnidobey: ack16:43
karni:)16:43
* fagan hates some lingo 16:43
dobeybah i give up for now. i need to get lunch and do a couple things. bbiab16:53
nessitaok, lunchtime17:00
nessitaI'll be back in 1.5 hrs17:00
nessitasee ya later!17:00
ralsinaeod for me, but will be back for a little while in about 4 hours17:20
dobeyhuh17:35
dobeyso the more stuff i fix, the more stuff breaks :(17:35
dobeysigh17:52
thisfreddobey: any thoughts on bug #791927 ? As in, how do I fix that? Fiddle with setup.py?18:01
ubot4`Launchpad bug 791927 in desktopcouch (Ubuntu) "apport hook in source package not installed (affects: 1) (heat: 6)" [Medium,New] https://launchpad.net/bugs/79192718:01
dobeyuhm18:04
* dobey looks18:04
dobeyugh, the desktopcouch setup.py needs a lot of love, but yes you need to tweak the setup.py for that18:07
thisfredok18:07
thisfredI'll look at the other packages to see what it need18:08
thisfreds18:08
nessitawell, lunch was shorter than expected :-)18:08
* nessita is back18:08
dobeythisfred: btw, does the hackers couchdb-bin result in 400 errors for oauth?18:08
thisfreddobey eh, not sure, in what situation?18:09
dobeythisfred: basically all the data_files bits that use "/usr/share/..." need to not start with "/usr/" but just be "share/..."18:09
thisfredkk18:09
dobeythisfred: well, chad's branch didn't land because the tests failed with lots of 400 errors18:09
thisfredI'll run the tests here18:10
thisfreddobey: ah oh I remember, there's a couchdb setting that has to be changed if you use the hackers couchdb:18:10
dobeywhere do i makes that change?18:12
thisfred[couch_httpd_oauth]18:12
thisfreduse_user_db = false18:12
thisfredin /etc/couchdb/default.ini18:13
dobeythisfred: uhm; why don't we put that in the default.ini in desktopcouch?18:16
thisfreddobey: because it's a temporary work around (I think) for something we broke in the server version of couchdb. Bottom line, we should not be running this on the desktop18:17
thisfredBut putting it in the local.ini/default.ini manually should also work, I think18:17
thisfredI mean in the ones that dc uses in ~/.local/share18:18
dobeywell18:18
dobeyit shouldn't be using that in tests18:18
fagankarni: did you see you and me are roomies for the week :)18:19
karnifagan: no I haven't, I'm a roomie with alecu in Londin AFAIK ?18:19
karnifagan: when?18:20
dobeythisfred: hrmm, the fact that tarmac user has a .local-share/desktop-couch/ is not a good sign :(18:20
thisfredhmm, yeah I thought all the tests talked to a couchdb instance in /tmp18:22
alecukarni, since I'm arriving a day earlier, marianna asked me to be ralsina's roommate, so we can share the room on saturday as well.18:22
dobeywell it shouldn't be in /tmp either18:22
dobeyit should all be inside ./_trial_temp/ really18:22
thisfredwe made this before we used trial18:23
thisfredbut yeah18:23
karnialecu: fagan: ah! you guys no more then I know \o/ :18:23
karni:)18:23
dobeywell, we made unit tests before we had a sane test runner; and now everything is f'n breaking :(18:23
fagankarni: hah18:26
* fagan didnt really mind who he rooms with18:26
* alecu neither, but he wanted to take the chance to discuss android stuff with karni.18:29
alecufagan, guess you'll have it now :-)18:29
karnialecu: we'll talk some about SSO in London, huh ? :)18:30
alecukarni, sure!18:30
fagankarni: I just had a weird vision of you and alecu cuddling and talking :D18:31
karnifagan: you're weird ;]18:31
fagankarni: yeah I little18:31
alecufagan, click it off, dude!18:31
fagan:D18:31
dobeygrr, apt is so braindead sometimes18:32
fagandobey: make a replacement18:37
fagan:D18:37
nessitacan I have a couple of reviews for https://code.launchpad.net/~nataliabidart/ubuntuone-control-panel/subscribe-folders/+merge/63266 ?18:38
nessitadobey: I'll start debugging the failures now. Where are you at with that?18:38
karniDanRabbit: man, really nice work with these icons!18:38
DanRabbitkarni: thanks :)18:38
karniDanRabbit: now you can make more for all Libre Office extentions, MS Office extentions, PDFs, and... hahah j/k ;)18:39
DanRabbitkarni: LOL, well I do have a few more mimes I can slide your way if you'd like them ;)18:40
DanRabbitkarni: these are the new mime's I'm working on for elementary 4 (and of course proposed for Humanity when they're complete)18:40
karniDanRabbit: hahah, let's leave it for now, but keep these sources safe!18:40
karni:)18:40
faganare we still calling it humanity?18:41
thisfreddobey: where should the file with the apport hook go? lib/desktopcouch?18:41
* fagan thought the themes are called mono or something 18:41
dobeyno18:42
nessitadobey: did you read my message?18:42
dobeythisfred: share/apport/package-hooks/18:43
thisfredah18:43
dobeynessita: i didn't see it. sorry; i am in an abyss is where i am with it. :(18:43
nessitadobey: but, did your diff changes or can I start from there?18:43
dobeyexceptions.AttributeError: 'ShutdownTestCase' object has no attribute 'backend'18:44
dobeynessita: i think i changed a couple more super() calls18:44
dobeynessita: let me paste a new one18:44
dobeynessita: actually i'll just push what i currently have18:46
nessitadobey: please, I'll go from there18:46
nessitadobey: even better18:46
dobeynessita: lp:~dobey/ubuntuone-control-panel/testing18:47
nessitadobey: ack, I'll be back with news!18:47
thisfreddobey: if i remove '/usr/' in desktopcouch, setup.py installs everything in /usr/local/lib/python2.7/dist-packages/desktopcouch-1.0.7-py2.7.egg/share/ which I don't think is right18:54
thisfredit needs the clever thing to put the prefix in right?18:54
dobeythisfred: because you didn't install with --prefix18:54
dobeyhrmm, but shouldn't be in the egg, that is a bit weird18:55
thisfreddobey: well without prefix it should go to /usr/local/share, no?18:55
dobeyi would think so18:55
thisfrednot inside the egg, that will never work18:55
dobeybut this /is/ python we're talking about18:55
thisfredI think we need to do the prefix substitution like we do in other packages18:55
dobeythisfred: http://bazaar.launchpad.net/~ubuntuone-control-tower/ubuntu-sso-client/trunk/view/head:/setup.py#L35718:56
dobeythisfred: that's basically how the data_files should look18:56
dobeythisfred: we don't do prefix substitution anywhere18:57
thisfredthat's how it does look, and it doesn't work.18:57
karnican a UDF be renamed? do we support that?18:58
dobeythisfred: ok, well leave it for now and i can look at it more later. need to deal with the test stupidity, and then get the gnome3 compat issues fixed up so stuff will work on oneiric18:58
dobeykarni: not sure; verterok, facundobatist, or lucio_ ^^?18:59
verterokkarni: no, it can't be renamed18:59
karniverterok: \o/ thanks18:59
=== lucio_ is now known as __lucio__
thisfreddobey: fixed it, we needed DistutilsExtra's setup, rather than the one from setuptools19:03
dobeythat doesn't seem like a "fix" to me19:03
dobeyanyway, whatever; this twisted stuff is killing me19:04
thisfreddobey well, that's what the file you pointed to does as well. setuptools.setup just doesn't do prefixes in this way. (so at all really)19:06
dobeyyes, because sso needs stuff in distutilsextra19:06
thisfreddobey we have one hardcoded path left that puts something in /etc/19:07
dobeyanyway, like i said. if it works it works; i'm more concerned about all the stuff not working for me19:07
dobeythisfred: yeah, the /etc/ has to be there i think19:07
thisfredright19:07
thisfredanyone care for a quick review? https://code.launchpad.net/~thisfred/desktopcouch/lp-791927/+merge/6327119:09
tcolethisfred: looks good in general; out of curiousity, what's the deal with the installation paths being changed from absolute to relative?19:16
thisfredtcole: this means we can install with a --prefix19:19
thisfredonly works with distutilsextra's setup though19:19
tcolegotcha19:20
tcole+119:21
dobeynessita: any luck yet?19:24
nessitadobey: I'm trying to fix all the u1cp tests to be, what I think is, correct19:25
nessitadobey: I'm getting tons of:19:25
nessita    len(self.bus.list_names()))19:25
nessitaubuntuone.devtools.testcase.InvalidSessionBus: Too many bus connections: 10019:25
nessitabut I think we're not cleaning up the connection after being used, because the number increases by one after each test19:25
nessitaso we're using the proper dbus but we're not cleaning up correctly19:26
dobeyyou are breaking stuff then19:27
nessitadobey: meaning?19:27
dobeywell 100 is a lot; even when i was trying to make that check work correctly in devtools, i never got more than like 45 for the too many connections error, in u1cp tests19:27
nessitadobey: 100 is the amount of tests, I can show you the trace19:28
dobeyso if it's at 100, it seems like maybe you're doing something that makes it connect to the live session bus19:28
nessitaI don't think so, it grows by one after each test19:28
dobeygrows by one just means that the connections aren't getting cleaned up. has nothing to do with which daemon it's connected to; does it start at 3 and grow by one all the way to 100?19:29
nessitachecking that right now, but seems like it19:30
dobeyFAILED (skips=1, errors=61, successes=14)19:30
nessitayeap19:30
dobeyso those numbers do not add up to 10019:30
dobeyerr, nevermind19:30
nessita...19:30
dobeythat was me only testing one file19:30
nessita;-)19:31
dobeyhow are you running the tests that you get 100 tests?19:31
nessitadobey: I think I can make some progress, or at least I will do some serious cleanup on u1cp tests19:31
nessitaI've found several bugs already19:31
dobeywell i am stuck at this:19:32
dobeyexceptions.AttributeError: 'ShutdownTestCase' object has no attribute 'backend'19:32
nessitadobey: inside what folder/module?19:33
dobeywhich makes no sense to me19:33
dobeyubuntuone.controlpanel.integrationtests.test_dbus_service.ShutdownTestCase.test_shutdown19:33
nessitahum19:33
nessitasounds like... not sure19:33
dobeyit seems like the BaseTestCase.setUp() is not being run, which would be weird19:34
nessitawell, I'm also at the point where:19:34
nessitaexceptions.AttributeError: 'OperationsErrorTestCase' object has no attribute 'backend'19:34
nessita:D19:34
dobeyright same problem19:36
dobeybut ShutDownTestCase only has one test, and it's at the end, so i was looking to try and fix it first (since fixing it would probably also mean the rest get fixed as well)19:36
dobeyweird19:37
dobeyso for some reason, setUp is not getting run19:37
dobey        yield super(ShutdownTestCase, self).setUp()19:37
dobeyput that inside the test_shutdown(), and the error went away19:38
nessitadobey: look, I made the exception more verbose for the InvalidSession and I can tell that all those are test names ( and not the system ones) http://pastebin.ubuntu.com/616957/19:38
dobeytcole: ^^ have ANY idea why that would be? subclass without a setUp(), and the parent setUp() not being run at all?19:39
dobeynessita: ok, so you broke tearDown() chain somewhere, because i have not hit any of those yet19:39
nessitadobey: if you move stuff around and it suddendly starts to work, it means we're having timing issues. Very, very likely that a deferred that is not waited for in a setUp manages to finish when the test is executed19:39
nessitadobey: I added all the missing (I KNOW) inlineCallbacks19:39
dobeyoh19:40
dobeydo not do that19:40
nessitadobey: there is no point of yielding if we're not waiting for those deferred19:40
dobeyyes there is19:40
dobeytwisted is horribly awfully broken19:40
nessitadobey: having yield there is pointless without the inlineCallbacks19:40
dobeyno it isn't19:40
nessitadobey: what do we gain having it?19:40
dobeynessita: forcing synchronous calling19:41
nessitadobey: no without the inlineCallbacks19:41
dobeynessita: yes, without the inlineCallbacks19:41
nessitadobey: how are you so sure? :-)19:41
tcoleum, yield without the callbacks certainly is pointless19:42
dobeynessita: because twisted TestCase calls setUp asynchronously via deferreds internally, and causes lots of race conditions19:42
tcoleinlineCallbacks consumes the output of the generator and actually waits for the callbacks19:42
dobeytcole: maybe if twisted wasn't broken, that would be true19:42
tcoleif you just use yield without inlineCallbacks, then most of that function will never even get called19:42
tcolebecause nothing is consuming the generator19:42
nessitadobey: my point exactly19:43
nessita(what tcole says)19:43
dobeywhen can we get rid of twisted?19:43
nessitaanyways, dobey, you can try moving forward with your way, I can try mine, and see where we are at in one hour~19:43
nessitaI'm convinced we need to use yield+inlineCallbacks. If that breaks stuff, we need to fix our bugs! :-)19:44
* nessita will try19:44
dobeynessita: well it doesn't matter, because you will never make it work with @inlineCallbacks on the setUp/tearDown19:44
nessitadobey: I'm amazed by your certainty... what makes you be so sure?19:44
dobeynessita: because i spent over a day just trying to make it work correctly for the 2 tests in devtools, and never got it working right.19:45
nessitadobey: so, using yield+inlineCallbacks in the devtools suite shows the issue?19:45
dobeywhich is why the DBusTestCase setUp/tearDown does not have inlineCallbacks, because twisted is horribly broken and doesn't work19:45
dobeynessita: yes, it causes pretty much all the tests in sso and cp to fail, because the stuff never gets called correctly19:46
nessitadobey: I switch to yield+inlineCallbacks on devtools and the suite runs fro devtools runs fine. Let me try u1cp :-)19:46
tcoletwisted has some design problems, but we need to distinguish between what's actually broken and a lack of understanding of some aspects of python19:47
dobeynessita: yeah i think it works ok in devtools itself now because there are so few tests19:47
tcoleand for that matter what's broken in the tests themselves19:47
tcoleyeah, I'm not sure that devtools itself has adequate test coverage in this regard19:47
nessitadobey: I'll try, I think I can make it work. Using yield+inlineCallbacks on setUp/tearDown is what we did all along in u1client when I was in foundations19:47
nessitaso I have some knowledge about this. Worst case scenario I get as frustrated as you got yesterday, and we cry together19:48
dobeynessita: but it doesn't mean it is correct, either; afaict, no matter what one does with twisted, it is wrong.19:48
dobey:(19:48
nessitadobey: that sentence will get you nowhere :-) cheer up!19:48
tcolenessita: there are, unfortunately, some issues with twisted's TestCase and MI, since it doesn't provide a "ground" implementation of setUp and tearDown that return deferreds :/19:49
nessitatcole: I read that yesterday, while you were talking about that... I still find that hard to understand since inside syncdaemon we've been doing that all along19:50
tcoleI've been doing it myself, generally19:50
nessitaright19:50
tcoleanyway, if you d = super().setUp() and hit TestCase, the way it's written right now, you'll get None back19:51
tcoleand not a deferred19:51
tcoleI think the thing that has saved us so far is that most of our test case subclasses don't super() that far up19:52
nessitaI see19:52
nessitawell, maybe we can avoid supering all that way up...19:52
tcolewhich unfortunately is bad in the case where the nearest common ancestor is twisted's TestCase19:52
tcolenessita: the REALLY weird thing that we were seeing yesterday though was that super().setUp was itself None in some cases :(19:55
dobeytcole: no, it just returned None19:57
tcolemm, the error we were seeing was when we tried to call the result of super().setUp and it wasn't callable because it was None19:59
tcole(note the lack of () )19:59
tcole(I'm not talking about the result of super().setUp())19:59
dobeyyes i am noting the lack of19:59
dobeyand you are confusing the issue i think20:00
tcolemaybe20:00
tcoleI was getting pretty tired20:00
dobeythe problem was that setUp() returned None (because it was plain synchronous unittest.TestCase.setUp())20:00
tcolethere was that, too20:01
dobeythe attribute itself was never None, because it just ended up pointing at that from the inheritance20:01
tcolehm20:01
dobeyyou made some example code that was based on the assumption that setUp itself was None; but it didn't actually work, since it wasn't None20:02
tcoleok20:02
dobeywhen i changed it to check the result instead of the attribute, there were still issues, though20:02
dobeythe setup_dbus() bits never got called by the addBoth() for it20:02
dobeyand i used addBoth just to test that it was ever getting called, whether from an error or not20:03
dobeybut it never got called :(20:06
tcolethe deferred returned by maybeDeferred wasn't firing for some reason20:07
dobeyright20:08
tcoleanyway, for today I guess I'll stick with a bug and a test case and a branch for twisted20:11
nessitadobey, tcole: what I've found out (and is the only issue for running tests so far) is that the self.bus.list_names() gets dirtier after each test, so I'm trying to a) fail in tearDown if self.bus.list_names is not the same than when the test startes b) find out what cleanup we're missing20:13
nessitain particular, we never call self.bus.release_name, which is a bug!20:16
nessita:-)20:16
dobeynessita: yes, because tearDown isn't getting called, or is just ending up as a deferred that doesn't block on the close()20:16
dobeynessita: you don't need to call release_name if you just drop the connection to the daemon20:16
nessitadobey: it is being called for me, every single time20:16
nessitaI have a pdb in it20:16
nessitais being called, but the list_names() is not being cleaned up20:16
dobeynessita: the self.bus.flush()/self.bus.close() aren't20:16
nessitadobey: I can confirm they are20:16
nessitaput prints in between20:17
nessita(as long as you have inlineCallbacks added, otherwise, of course they will not be called)20:17
dobeythat makes absolutely no sense :)20:17
nessitaaux contraire!20:17
dobeybecause it was working without the inlineCallbacks20:17
dobeyotherwise that code wouldn't be in trunk20:18
nessitawell, not really, we have the NAME_ALREADY EXISTS thing going on20:18
nessitaif tests pass is a timing issue plus lucj20:18
nessitaluck*20:18
dobeynessita: yes, because your tests are connecting to the wrong bus20:18
nessitadobey: let's discussed when I have the branch working or I'm totally frustrated :-)20:19
nessitadiscuss*20:19
dobeynessita: http://bazaar.launchpad.net/~dobey/ubuntuone-control-panel/testing/revision/157#ubuntuone/controlpanel/integrationtests/__init__.py20:19
dobeynessita: the code in register_mockserver() was why you were getting the NAME_EXISTS running under qt reactor20:20
nessitadobey: I did all those changes PLUS I added inlineCallbacks. There and in devtools20:20
dobeynessita: i told you this the other day20:20
nessitadobey: yeah, but if I fixed that the other day all the non-qt tests broke terribly20:21
dobeyyes, because all the tests are terribly broken :)20:21
nessitaso let's fix this where we should fix it!20:21
* nessita fixes20:21
dobeywhich is why we're here now with all these problems :(20:21
nessitadobey: so, I already added those changes, they make sense. I added some more, I'll show you later, now I need some time to debug20:22
dobeythisfred: you know what is annoying20:28
dobeythisfred: the inconsistent usage of "desktopcouch" and "desktop-couch" inside desktopcouch20:28
thisfredagree20:30
thisfredme, I blame someone else20:30
dobeymust be that eric guy20:31
dobeyhe can be such a pain to work with20:31
thisfred'tis true20:31
=== thisfred is now known as thateric
thaterichey!20:31
=== thateric is now known as thisfred
tcoledobey: so, one mistake I made last night was that I was tired and misused maybeDeferred20:34
tcoleshould have been maybeDeferred(super(...).setUp) and not maybeDeferred(super(...).setUp())20:34
dobeywell two days ago at this point, but hey :)20:35
dobeyi don't think it matters though, and we'd still have the same issues20:36
tcolewell, that was the source of my confusion about None anyway20:36
tcoleusing maybeDeferred correctly seems to address one of the problems at least20:37
dobeywell it addresses the problem of getting a deferred to return, but inlineCallbacks does that too, right?20:38
tcoleI thought inlineCallbacks used maybeDeferred, but apparently it doesn't20:38
tcoleso we'd need to use it explicitly with or without inlineCallbacks+yield (versus addCallback)20:39
dobeyok, now i'm confused again20:39
dobeywhy would we need maybeDeferred with iC+yield?20:42
tcoleWell, roughly speaking what inlineCallbacks does is something like this, to the generator that the wrapped function returns:20:52
tcoledef chainCallback(gen):20:52
tcole    gen.next().addCallback(lambda _: chainCallback(gen))20:52
tcolei.e. it consumes a deferred from the generator, and adds a callback to it which consumes the next deferred and so on20:53
tcolebut it IS expecting deferreds20:53
tcolewhereas I'd erroneously thought that it did e.g. maybeDeferred(gen.next()).addCallback(...) instead of just gen.next().addCallback(...)20:53
tcole(does that make sense? to put it a different way, inlineCallbacks + yield works in two halves: a [generator] function that yields deferreds, and a decorator that consumes the deferreds and chains them together in sequence with addCallback)20:55
dobeyso yield in an inlineCallbacks wrapped function, has to be on something that returns a deferred?20:56
tcoleyeah, or more directly speaking the yielded value should be adeferred20:57
dobeyso basically, yield is useless for doing what i thought it did20:57
nessitayes! :-)20:57
dobeywell i can't help it if tcole explained it wrong to me :-/20:58
nessitadobey: sorry, seems like I failed to explain it too20:58
nessitaanyways, I narrowed the problems to dbus only20:58
tcoleat least I was able to explain it better this time20:59
nessitathe list_names() grow and I can't understand why. Before creating a dbus service instance, the list names is:20:59
nessitadbus.Array([dbus.UTF8String('org.freedesktop.DBus'), dbus.UTF8String(':1.0')], signature=dbus.Signature('s'))20:59
nessitaafter creating a service for the cp, I have:20:59
nessitadbus.Array([dbus.UTF8String('org.freedesktop.DBus'), dbus.UTF8String(':1.0'), dbus.UTF8String(':1.1'), dbus.UTF8String('com.ubuntuone.controlpanel')], signature=dbus.Signature('s'))20:59
dobeyright21:00
nessitabut when I release the name and shutdown the service, the list_names count goes down to 3, not 221:00
nessitaresult list_items is:21:00
nessita(dbus.Array([dbus.UTF8String('org.freedesktop.DBus'), dbus.UTF8String(':1.0'), dbus.UTF8String(':1.1')], signature=dbus.Signature('s')))21:00
dobeynessita: because there is still the client connection21:00
nessita:1:1 is the extra one21:00
nessitahum...21:00
dobey:1.1 is the client connection21:00
nessitadobey: good tip, I know where to go now21:01
nessitano wait, I don't :-D21:02
nessitadobey: how do I disconnect a client connection?21:02
thisfreddoh. my laptop no longer boots21:02
nessitadobey: also, the list_names() grows from 2 to 4 before even connecting any client21:03
dobeynessita: the DBusTestCase does it21:03
thisfredah there it goes21:03
nessitadobey: but the list_names() grows from 2 to 4 before even connecting any client, how do you explain that?21:03
dobeynessita: no it doesn't21:03
nessitadobey: yes, I'm testing it IRL...21:03
nessita    155     def __init__(self, backend, conn=None, object_path=None, bus_name=None):21:03
nessita    156         """Create this instance of the backend."""21:03
nessita    157         super(ControlPanelBackend, self).__init__(conn=conn,21:03
nessita    158                                                   object_path=object_padth,21:03
nessita    159                                                   bus_name=bus_name)21:03
nessita    160         print '\n-----------------', len(self.connection.list_names()),21:03
dobeynessita: how are you testing it?21:03
nessitathat makes a print with the 4 connections21:04
dobeypastebin child :)21:04
nessitadobey: sorry21:04
alecuhey all, can I get reviews on this?21:04
alecuhttps://code.launchpad.net/~alecu/ubuntuone-control-panel/more-devices-tab/+merge/6329221:04
nessitadobey: right after calling be = dbus_service.publish_backend() inside test_dbus_service.py:BaseTestCase the list_names growns to 421:04
nessitadobey: at that point there is no client whatsoever21:05
dobeyi don't know what publish_bakend does exactly21:05
dobeybut i guess it creates a connection to dbus, and then registers a name21:05
nessitadobey: it just creates an instance of ControlPanelBackend21:05
nessitadobey: http://pastebin.ubuntu.com/617013/21:06
nessitaalecu: can I trade? https://code.launchpad.net/~nataliabidart/ubuntuone-control-panel/subscribe-folders/+merge/6326621:06
alecunessita, ok, but I21:06
alecunessita, ok, but I'll do it later21:07
* alecu needs to go to pick Amelia right now.21:07
alecucheers, all!21:07
thisfrednessita: I'll do it21:07
nessitathisfred: thanks!!!21:07
dobeywell i'm sure ControlBackend() and ControlPanelBackend() connect to dbus?21:08
dobey    return dbus.service.BusName(DBUS_BUS_NAME, bus=dbus.SessionBus())21:08
dobeyugh, that is a problem21:08
nessitadobey: ControlBackend is dbus-agnostic, and ControlPanelBackend is a dbus service21:08
nessitadobey: so not sure if I understand your question, but no, they don't connect to dbus21:08
dobeynessita: yes ControlPanelBackend does21:09
nessitadobey: where?21:09
dobeynessita: get_busname(); the line i just pasted which is the only line in that function21:09
nessitadobey: ... get_busname() == connect to dbus? why?21:10
nessitamaybe I don't know what you mean with "connect to dbus"21:10
jdobrienalecu, in your branch Does the term "Other devices connected to my cloud" refer to devices that are actually connected now?21:10
jdobrienalecu, I know those aren't your words, I'm just curious21:11
dobeynessita: dbus.SessionBus() == connect to dbus21:12
nessitadobey: the line  dbus.service.BusName(DBUS_BUS_NAME, bus=dbus.SessionBus()) generates a new connection bind to 'com.ubuntuone.controlpanel'21:12
nessitadobey: I've added prints before and after21:13
dobeynessita: prints that do what?21:13
nessitaand before that call, the ':1.1' is already there21:13
dobeythat code needs to be like this: http://pastebin.ubuntu.com/617022/21:13
dobeyand the tests need to pass in the already existing bus connection21:13
nessitadobey: http://pastebin.ubuntu.com/617023/21:14
nessitaanyways, that doesn't explain where the 1:1 conn comes from21:14
nessitaI mean, seems like dbus.Session() is not an issue21:14
dobeywell i don't know where it came from21:14
dobeyit came from somewhere in the code whwere a bus connection is created21:15
thisfredfrom the print itself? Since that does dbus.SessionBus()21:15
dobeyprobably21:15
nessitathisfred: if I remove the print and list the list_names further in the code, the list is the same21:16
nessitathe 1:1 appears21:16
dobeynessita: how are you listing the names?21:16
dobeynessita: are you doing self.bus.list_names() in the test? or are you doing dbus.SessionBus.list_names() somewhere again?21:16
nessitaself.bus21:17
thisfredbut not in the prints21:17
thisfredor am I stupid?21:17
nessitathisfred: yes in the prints inside tests21:17
nessitathisfred: the pastebin is not test code but "live" code21:18
thisfredok21:18
thisfredfukfukfuk, I might not have a working laptop for the sprint21:19
dobeyheh, did you install 11.10 on it?21:19
thisfredreinstall attempt 221:19
dobeytime to buy a new laptop?21:19
thisfreddobey I tried, stupidly21:19
dobeynessita: you should also print unique_name() if you really want to debug that; otherwise you can't tell which is you and which is others.21:20
nessitadobey: ok, I'll do that21:21
dobeynessita: which is another reason that bus needs passed in21:21
nessitausing d-feet, both 1:0 and 1:1 are associated to python /home/nessita/canonical/u1/devtools/trunk/bin/u1trial -t test_dbus_service.ShutdownTestCase ubuntuone21:21
nessitawhich is... nosense?21:22
dobeynessita: right21:22
dobeyno21:22
dobeyone is probably created by DBusTestCase, and the other is probably a dbus.SessionBus() singleton that never gets closed21:22
dobeybecause you're calling SessionBus() when you shouldn't be :)21:22
nessitadobey: let me prove you or me wrong21:23
* nessita adds anothe key print21:23
nessitadobey: YOU ARE RIGHT!21:24
nessita:-)21:24
nessitagreat, I know how to move on with this21:25
nessitadobey: thanks! I'll remove all the explicit calls to dbus.Session21:25
nessitapassing the testing bus session around21:25
dobey:)21:26
dobeyok, am off for the evening. have a good one21:48
tcoleyou too21:50
=== m_conley is now known as m_conley_away
thisfrednessita: hmm, I can't run DEBUG=True PYTHONPATH=. ./bin/ubuntuone-control-panel-qt22:23
thisfredit gives me an import error22:23
nessitathisfred: for qtreactor?22:23
thisfredno22:24
thisfredI have that22:24
thisfredTraceback (most recent call last):22:24
thisfred  File "./bin/ubuntuone-control-panel-qt", line 33, in <module>22:24
thisfred    from ubuntuone.controlpanel.gui.qt import main22:24
thisfredImportError: No module named qt22:24
nessitadid you run ./setup.py build?22:24
thisfredah no, that's the missing step22:24
nessitaalso, is weird, that path is versioned22:24
thisfrednessita: after I ran that, I get the same though :(22:25
nessitathisfred: is weird,  ubuntuone.controlpanel.gui.qt is a versioned path22:25
thisfredwhat does that mean?22:25
nessitathe QT dir is in the repo22:25
nessitals -l ubuntuone/controlpanel/gui22:25
thisfredoh yeah the dir is there22:26
thisfredI suspect the import error is caused by something else22:26
nessitaare the __init__.py files there?22:26
thisfrednessita: yep22:26
nessitayou sure you're running PYTHONPATH=. ?22:27
nessitacan you try:22:27
nessitaPYTHONPATH=. python -c "from ubuntuone.controlpanel.gui.qt import main"22:27
thisfrednessita: DOH! typo in PYTHONPATH :)22:28
nessitaah!22:28
nessitawell, the world is in place (still)22:28
thisfrednessita: so we have to do this through subprocess.Popen? Probably because we have no dbus on windows, I guess? But is there really no API we can use from sd?22:31
nessitathisfred: we do it from subprocess.Popen as a hack becasue qt + twisted reactor + dbus = seg Faults22:33
nessitathisfred: is a 110% ugly hack, the main part is building the QT ui22:34
thisfrednessita: ok, works for me :)22:34
nessitafor me too! :-P)22:34
thisfrednessita: one more question: I really don't understand the reason for  @gui.defer.inlineCallbacks22:35
nessitainstead of @defer.inlineCallbacks?22:36
nessitaor why they are there at all?22:36
thisfredit's just getting t.i.d.inlineCallbacks22:36
thisfredthe first22:36
thisfreddo we monkey patch defer?22:36
nessitanopes22:36
nessitaI just like to use the import from the module I'm testing22:37
thisfredno folders doesn't do anything with it22:37
thisfredWhy?22:37
nessitafrom my POV, is cleaner. For example, if we change twisted deferred's for plain python deferreds, we just change that in the gui module22:38
thisfredThis implies that it's some special version of defer, to me, so it makes the tests more mysterious22:38
thisfredI strongly disagree that it's cleaner22:38
nessitafor me is like the implementation gets really hidden22:38
thisfredYour choosing programmer laziness over readability22:38
nessitathrough all my tests I always use: gui.os, gui.gtk, etc22:38
thisfredthat is horrible22:38
* alecu reviews nessita's branch22:39
thisfredIMO :)22:39
* alecu does not like it either.22:39
nessitathisfred: I disagree, I find it cleaner. But I don't think we will reach an agreement here22:39
nessitaI can remove the gui., no problem22:39
nessitaI'll fix it soon, I'm trying to debug a dbus nightmare here22:39
thisfredplease, other than that, it is great. (Also, renaming folders to gui I would not do, only do import as when there are name clashes)22:40
thisfredthis all breaks the principle of least surprise22:40
nessitaalecu: any idea why sig.remove(), where sig is the result of a proxy.connect_to_signal, is not removing the connection between the handler and the proxy from the dbus?22:40
alecunessita, that sounds like a qtreactor+dbus issue22:41
nessitaalecu: I'm running plain glib reactor :-(22:41
alecu:P22:41
nessitabut, good guess! it made sense :-D22:41
alecunessita, then no idea :-(22:42
nessitaI know!22:42
* nessita fixes22:42
thisfredalso: independent of opinion on cleanliness: these things make refactoring harder. It's exactly like using relative imports22:43
nessitathisfred: from my POV, is the exact opposite. After actually doing several refactors, these things ease it. AT least in my experience :-)22:43
thisfredat least if we assume that our code changes more frequently than we switch between different libraries22:44
nessitawhich is not that true...22:44
thisfredI know we're going through big changes *now* but that's fairly atypical22:44
thisfredor at least I hope to god it is :)22:45
thisfrednessita: ok, have to walk the dog, ping me when a new version is pushed, and I'll approve in a bit22:46
nessitathisfred: thanks!22:46
alecunessita, I'm following the dbus code and can't find a quick reason to give. There should be something wrong in the setup in order for the remove to not work.22:48
nessitaalecu: yes, I found it22:48
alecunessita, it even has a thread lock, so it does not looks too conspicuous.22:48
nessitaalecu: we're mixing the real session bus with the test bus22:49
alecunessita, oh, that.22:49
nessitaI'm fixing that22:49
nessita(it will not be pretty)22:49
alecunessita, how are we mixing it????22:49
nessitathisfred: pushed to revision 162.22:49
nessitaalecu: by calling dbus.SessionBus() anywhere in live code or test code22:49
thisfrednessita: thx, rereviewing (waiting for the mail, and the dog thinks it's too hot anyway)22:50
nessitathisfred: lol22:50
alecunessita, hmmm... but since we are setting the ENV with the value of our connection... the dbus.SessionBus() should use our test daemon, right?22:50
nessitaseems like that is not happening22:51
nessitaempiric prints and tests shows that is not happening22:51
alecuok.22:52
thisfredscience does not lie22:56
nessita:-D22:56
alecunessita, approved.23:02
nessitathanks!23:03
alecunessita, you didn't get to review my branch, right?23:03
nessitaalecu: not yet, is in my ToDO23:03
nessitaoh, but you leave tomorrow!23:03
alecunessita, right. In fact, I'm going to fill my lugagge right now.23:04
nessitaalecu: I will have to leave it for tomorrow, I need to run to a dinner...23:04
* alecu will be back later.23:04
nessitaI will tomorrow23:04
alecunessita, no problem.23:04
* alecu will be back later anyway.23:05
nessitaok23:05
nessitabye alecu23:05
nessitahave a safe trip!23:05
nessitaok, gotta run23:06
nessitabye all!23:06

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