/srv/irclogs.ubuntu.com/2012/05/23/#juju-dev.txt

davecheneyniemeyer: http://paste.ubuntu.com/1002200/01:05
davecheneyas an example API01:05
davecheneyi will have to add mutexs around all of the variables touched by SetConfig to ensure their visibility01:17
niemeyerdavecheney: Might make sense to have one or more internal helper methods.. e.g.: func (e) credentials() (accessKey, secretKey string)01:26
niemeyerdavecheney: So the locking is constrained01:26
davecheneyyeah, each providor is different01:27
niemeyerdavecheney: yeah, that's for internal use only01:27
davecheneyin ec2, config is used to construct an ec2 and s3 at open time01:27
davecheneyso those will need to be reconstructed01:28
niemeyerdavecheney: Same idea.. rather than credentials, func (e) s3() *S3 then..01:28
davecheneyyup01:28
niemeyerdavecheney: So locking is only necessary within the method itself01:29
davecheneyi will try to make it as fine grained as possible01:29
niemeyerdavecheney: I was more worried about convenience than granularity in this case01:30
niemeyerdavecheney: THis is a very rare event01:30
davecheneyyup01:30
niemeyer... value *net.OpError = &net.OpError{Op:"remote error", Net:"", Addr:net.Addr(nil), Err:0x28} ("remote error: handshake failure")01:31
niemeyerCom'on Amazon01:31
niemeyerWoohay02:26
niemeyerSigned URL works02:26
niemeyerand proposed02:46
davecheneyniemeyer: just go though a first cut of Environ.SetConfig02:48
niemeyerdavecheney: Nice02:50
niemeyerdavecheney: How does it feel?02:50
davecheneynot too bad02:50
davecheneyhad to use _variables02:50
davecheneywhich feel icky02:50
davecheneybut adding accessors for the configuration items wasn't too bad02:50
davecheneyjust running off lbox propose02:51
niemeyerdavecheney: Feels icky indeed02:54
davecheneyhttps://code.launchpad.net/~dave-cheney/juju/go-environs-setconfig/+merge/10693002:55
niemeyerdavecheney: Will let you know if I can think of something else tomorrow02:55
niemeyerdavecheney: Right now it's past bed time here02:55
davecheneyniemeyer: at the risk of reactivating the discussion from earlier02:56
davecheneythe proxy environ was cleaner02:57
davecheneyas in the case of ec2, we replace everything when we call SetConfig02:57
davecheneythe end result is very similar02:57
davecheneybut we can continue that discussion tomorrow02:57
niemeyerdavecheney: It's actually not, for the reasons I explained.. doing e.Foo(); e.Bar() and being completely unable to tell whether e is a completely different value is a no no.02:58
davecheneyfair enough, i'm happy the discussino is closed02:58
niemeyerdavecheney: I'm happy to discuss other possibilities, but something that has that property won't fly02:58
davecheneyniemeyer: understood02:58
niemeyerdavecheney: The locking you did, even if it feels like overhead, is putting you in control02:59
davecheneywhy does lp treat me so badly ?03:09
davecheney% lbox propose -wip -edit03:09
davecheneyerror: Failed to load data for project "juju": Get https://api.launchpad.net/devel/juju: unexpected EOF03:09
davecheneyit's totally random03:09
niemeyerdavecheney: Good question.. I haven't seen that level of weirdness03:10
niemeyerdavecheney: and I'm not specially close to it either03:11
niemeyerAnyway, bed for reals now :)03:11
niemeyerdavecheney: Have a good EOD03:11
davecheneykk03:11
davecheneyrogpeppe: around today ?06:58
TheMuedavecheney: Heya07:01
davecheneyhey frank07:01
davecheneyhow are you going ?07:01
TheMuedavecheney: Fine, pretty wither today here in Germany. And you?07:02
davecheneypretty cold in sydney07:03
davecheneystill grinding on the provisining agent07:03
davecheneystill rewriting the environs interface :)\07:03
TheMuedavecheney: I'm still working on the relations, currently three depending branches in the queue.07:06
rogpeppedavecheney: just up07:12
rogpeppedavecheney, TheMue: morning!07:12
TheMuerogpeppe: Heya07:12
Arammorning.07:29
rogpeppeAram: hiya07:39
TheMueAram: Moin07:55
rogpeppefwereade: yo!09:25
fwereaderogpeppe, heyhey09:25
=== Guest__ is now known as smaddock
fwereaderogpeppe, I just saw yu had anothe CL in that same sort of area perhaps?09:26
fwereaderogpeppe, if my comments are redundant, sorry09:26
rogpeppefwereade: i'm moving it all forward bit by bit...09:26
fwereaderogpeppe, cool -- I'm just not sure about fixing the name without fixing the type ;p09:27
rogpeppefwereade: you think that InstanceSpec is ill-conceived? what should we have there?09:27
fwereaderogpeppe, the type itself is not so bad, but half the fields are misleading/useless09:27
TheMuefwereade: Moin09:27
rogpeppefwereade: "a type that is moderately ill-conceived in the first place." :-)09:27
fwereaderogpeppe, we have no interest in daily, desktop, or instance-store images09:27
rogpeppefwereade: ok, i'll take out that param09:28
fwereaderogpeppe, when fully 50% of a type's fields are irrelevant, I think a little of the ill-conceivedness leaks out into the type itself :p09:28
rogpeppefwereade: naah09:28
fwereaderogpeppe, ok, "obscures any essential rightness the type may be in posession of"09:29
rogpeppefwereade: it's a place-holder for things to come IMHO09:29
rogpeppefwereade: the important change is that the i want the type to represent the constraints on an instance, not just an machine image.09:29
fwereaderogpeppe, sure, a type can be incomplete, but it's carrying baggage that's just unhelpful, and that's all I'm complaining about09:30
rogpeppes/the i/i/09:30
fwereadeTheMue, heyhey09:30
rogpeppefwereade: sure. maybe this is a good CL to change some of those in.09:30
rogpeppefwereade: or perhaps i could do that in another CL09:30
rogpeppefwereade: i'm trying hard to keep CL sizes down.09:30
rogpeppefwereade: i.e. move things forward in small increments.09:31
fwereaderogpeppe, I'm easy09:31
rogpeppefwereade: my next branch is too big and i'm going to need to split it up, which is a right pain09:31
fwereaderogpeppe, yeah, I seem to spend rather too much of my time doing that sort of thing09:32
rogpeppefwereade: i was thinking last night that i want some way of saying "factor *these* changes into a new branch" - in about one line of shell.09:32
Aramso you want git? :D.09:33
* Aram hides.09:33
* rogpeppe has never used git09:33
Aramit does that thing.09:33
Aramprobably the only thing it does well.09:33
fwereadethat was kinda my first thought too :)09:33
rogpeppeAram: out of interest, what git command would you use to do that?09:34
Aramif you want to do it at commit time, you just git add your changes (my understanding is that you can git add parts of the file as well, not whole files).09:36
Arambasically in git you don't commit everything by default, but have to chose what to commit every time.09:36
Aramthere's also cherry picking.09:36
Aramthat makes it easy to move only some changes between branches, but not every change.09:36
Aramcherry picking is literally picking commits from one place and applies them somewhere else, so you don't have to do any manual merging step or whatever. really handy.09:38
Aramas much as I dislike git and I complain about it all the time, it does some things well.09:38
rogpeppefwereade: hope you've had a good few days off, BTW09:44
rogpeppefwereade: for PersistentStorage/Daily/Desktop, are you saying that we will *never* want to use anything but PersistentStorage=true, Daily=false, Desktop=false ?09:46
rogpeppefwereade: because that logic is in the python version, so i copied it across09:47
rogpeppefwereade: but if we know the settings for all time, i'm always happy to delete code!09:47
fwereaderogpeppe, yeah: all that stuff is gone from the python09:52
rogpeppefwereade: sigh09:53
fwereaderogpeppe, and niemeyer appears to be -1 on handling instance-store stuff09:53
rogpeppefwereade: ok, i'll remove the settings in an upcoming branch09:53
fwereaderogpeppe, which I can get behind tbh, even though it would be trivial to implement09:53
fwereaderogpeppe, cool, thanks09:53
fwereadeupdates, restarting09:54
rogpeppetest10:29
TheMuerogpeppe: success10:31
rogpeppeTheMue: thanks. my web browser seems to be playing up.10:31
TheMuefwereade: Thx for review. Requirer as noun exists? Sounds strange. But ok. ;)10:32
rogpeppecool google logo today10:33
fwereadeTheMue, it's not one I'd use in conversation, but it's definitely closer to legitimate english than, say, "ReadCloser" :p10:33
TheMuerogpeppe: Already played a song?10:33
TheMuefwereade: Hehe, yeah.10:34
TheMuefwereade: So, name change done. No merge it again into the follow-up.10:44
fwereadeTheMue, cool, thanks10:45
fwereaderogpeppe: in testing charm repos, would you agree it makes most sense to run them against an actual store.Server?11:18
rogpeppefwereade: it depends how much interaction with the server it has, i guess11:19
rogpeppefwereade: if it's just a simple GET, then maybe there's no point.11:19
rogpeppefwereade: we don't necessarily want to fire up mongodb for every test.11:19
rogpeppefwereade: but that's a *totally* off-the-cuff response!11:20
fwereaderogpeppe, that's the thing... it does feel a little bit heavyweight11:20
fwereaderogpeppe, but a canned-response tet server feels a little lightweight :/11:20
rogpeppefwereade: does it actually do anything other than a simple GET?11:21
fwereaderogpeppe, I'll think on it some more; early lunch today, maybe somewhat extended; will be back for the rest of my "morning" in a bit11:21
fwereaderogpeppe, (taking half-days this week)11:21
rogpeppefwereade: cool11:21
rogpeppefwereade: still in the UK presumably?11:21
rogpeppefwereade: hope you've got the same lovely weather we have. perfect for half days...11:22
TheMuerogpeppe: Could it be that the watcher problems are since about one week?12:53
rogpeppeTheMue: it's possible.12:54
rogpeppeTheMue: i couldn't say for sure i'm afraid12:54
rogpeppeTheMue: have you got a possible candidate for the source of the problems?12:55
TheMuerogpeppe: Just found the change introducing the "initialValue" flag in the content watcher.12:55
rogpeppeTheMue: it's entirely possible that's the problem!12:55
TheMuerogpeppe: And the problem I've got here in my test belong to the content watcher.12:55
rogpeppeTheMue: it may easily all be my fault.12:55
rogpeppeTheMue: if that's true, we need better tests in the watcher package :-)12:56
TheMuerogpeppe: *lol*12:56
TheMuerogpeppe: What's the intention behind this flag?12:56
rogpeppeTheMue: it's so that the initial value is always sent, regardless of what it is12:56
rogpeppeTheMue: perhaps your tests are assuming otherwise...12:57
rogpeppeTheMue: s/tests are/code is/12:57
TheMuerogpeppe: That's possible, the old behavior has been different.12:57
rogpeppeTheMue: i think maybe the old behaviour didn't send something if the initial contents were blank12:58
rogpeppeTheMue: that might actually be the behaviour we want, i guess.12:58
rogpeppeTheMue: one question: why doesn't the test fail all the time?12:58
TheMuerogpeppe: It might or it is?12:59
rogpeppeTheMue: i dunno. depends what we're after.12:59
TheMuerogpeppe: Yes, that's an interesting question.12:59
rogpeppeTheMue: i think it's probably because it depends whether the content watcher sees the initial blank value before the test changes it.12:59
TheMuerogpeppe: So we're back to the race condition.13:00
rogpeppeTheMue: yeah, but we know what the problem is, and it's easy to solve - just put a sleep before the initial contents set.13:01
TheMuerogpeppe: Yip13:01
rogpeppeTheMue: woof13:01
=== asavu_ is now known as asavu
niemeyerHello all13:31
Aramhi.13:32
niemeyeryo.13:34
niemeyerAram: Monday is the day then?13:34
Aramyes.13:34
niemeyernice.13:34
niemeyerthat's.13:35
niemeyerawesome.13:35
niemeyer:-)13:35
Aramyes :).13:35
niemeyerrogpeppe, TheMue, fwereade: Aram is joining us officially on Monday13:35
rogpeppeniemeyer: cool. i heard from robbiew yesterday.13:36
rogpeppeAram: welcome!13:36
TheMueniemeyer: Moin. Great news!13:36
Aramthanks, hi all!13:36
TheMueAram: Welcome.13:36
andrewsmedinafwereade: thanks for your review :D13:40
fwereadeandrewsmedina, a pleasure :)13:51
fwereadeAram, welcome!13:52
fwereadeniemeyer, heyhey13:52
Aramthanks/.13:52
niemeyerandrewsmedina: Heya13:53
niemeyerandrewsmedina: Aram is joining the team on Monday, btw13:54
niemeyerfwereade: Heya13:54
niemeyerrogpeppe: Wanna have another look at SignedURL?13:56
rogpeppeniemeyer: looking already13:56
niemeyerrogpeppe: Cool, thanks for the review, looks even better now :)13:57
rogpeppeniemeyer: "14:00
rogpeppeCorrupting the returned URL is testing the behavior of something that is not14:00
rogpeppewhat the method produces.14:01
rogpeppe"14:01
rogpeppei was suggesting, i think, that we test that the unsigned URL would fail where the signed URL would succeed14:01
rogpeppei'm not sure that the tests verify that currently - we're just assuming that Get of the unsigned URL will fail because the object is private14:01
niemeyerrogpeppe: And I'm suggesting that this is not testing SignedURL14:02
niemeyerrogpeppe: Because you're testing something that is *not* the signed URL14:02
andrewsmedinaAram: welcome :D14:02
rogpeppeniemeyer: the assumption of those tests is that the signed URL is giving us something that the unsigned URL does not, right?14:02
niemeyerrogpeppe: There are positive and negative tests in place already, and both of them verify the real URL.14:02
niemeyerrogpeppe: No14:02
niemeyerrogpeppe: The unsigned URL is completely irrelevant14:02
niemeyerrogpeppe: The behavior of a signed URL stands on its own.. if you corrupt the URL, you're not testing the method anymore14:03
Aramandrewsmedina: thanks.14:04
rogpeppeniemeyer: if the server is letting everything through anyway, then the signing is irrelevant and the test isn't testing anything.14:04
rogpeppeniemeyer: my suggestion makes sure that the test *is* actually testing something.14:04
niemeyerrogpeppe: If the server is letting everything through, the tests will fail, and they *did fail*!14:04
niemeyerrogpeppe: They are testing something.. please take the code and set authIsBroken to 114:05
andrewsmedinaAram: were are you from?14:05
niemeyerrogpeppe: or 014:05
niemeyerrogpeppe: It will break, because the auth is letting everything through in the fake server14:05
TheMuerobbiew: Hi. I'm ready.14:05
rogpeppeniemeyer: for instance, i think the test would succeed ok if the server verified expiration time without testing the signature14:05
Aramandrewsmedina: I am from romania but I currently live in austria.14:05
TheMueAram: Austria? Ah, so you now may be the nearest to me. Been twice in Vienna, a wonderful town.14:06
niemeyerrogpeppe: Heh.. the server may be broken in all kinds of ways, yes14:07
andrewsmedinaAram: I'm from Brazil14:07
* TheMue should measure, Roger still has good chances to be nearer.14:07
AramTheMue: where are you from?14:07
TheMueAram: Oldenburg in North Germany14:07
rogpeppeniemeyer: it's ok, i don't mind if we don't do the check. it was just a suggestion.14:07
Aramandrewsmedina: same place as niemeyer?14:08
niemeyerrogpeppe: If it allowed you to see a *private* object, just because you provided a URL with an expire time, what is broken is not the SignedURL method, though.14:08
niemeyerrogpeppe: Thanks for the suggestion. I've read it, understood it, and replied.14:08
robbiewTheMue: g+ invite on the way14:08
TheMuerobbiew: ack14:09
rogpeppeniemeyer: true. but it does mean we haven't verified SignedURL. i don't mind much.14:09
niemeyerrogpeppe: No, it doesn't mean that. I don't mind much that you don't agree either, though.14:10
andrewsmedinaAram: no, I live in Rio de JAneiro14:10
niemeyerrogpeppe: Because we tend to get in those interminable arguments very frequently.14:10
rogpeppeniemeyer: sorry about that14:10
niemeyerrogpeppe: The test not only worked, but it detected the fact that the auth in the server was broken. There's a positive and a negative test, both verifying access to a private object.14:11
niemeyerrogpeppe: Your argument is that you wanted to see that a plain URL, *without signature*, works.14:12
niemeyerrogpeppe: It's beyond me how you're willing to argue that to death.14:12
niemeyer</argument>14:12
rogpeppeniemeyer: i'm not. i've stopped. i'm fine with what you've got.14:12
niemeyerrogpeppe: You've stopped with "it does mean we haven't verified SignedURL". Thanks, but that sucks.14:13
niemeyerrogpeppe: Enjoy the method, though. Happy to help.14:14
rogpeppeniemeyer: oh sorry. i meant that only in the case that the server is broken so it checks the expiry time only.14:14
AramTheMue: by air you seem to be the same distance from me and rogpeppe, by land I'm closer because there's no water to cross.14:16
rogpeppeniemeyer: "// URL returns a non-signed URL that allows retriving the object at path".14:17
rogpeppes/retriving/retrieving/14:17
rogpeppe:-)14:17
rogpeppeand i'd s/a non-signed/an unsigned/ too14:18
rogpeppebut i'm too late ...14:18
niemeyerrogpeppe: Fixed.14:25
TheMueAram: Yes, it's funny how near the UK is, only the North Sea between us.14:29
niemeyerHeading to lunch15:06
fwereadehey all: despite the very long lunch, I'm pretty sure I've done my half day now15:18
rogpeppefwereade: np. you might want to have a brief look at this, if you have any time at all: https://codereview.appspot.com/620909415:18
rogpeppefwereade: it adds a "public-bucket" field to the ec2 config15:19
rogpeppefwereade: i'm not entirely sure that's the best name for it, but gotta start somewhere...15:20
rogpeppei have to have some lunch too15:20
Aramwhat's your setup guys, do you use a stable or unstable ubuntu release for development?15:21
Aram(so the hidden question really is if a stable version is good enough).15:21
fwereaderogpeppe, it suddenly seems to me as if we're going to a lot of trouble to accommodate something in juju (tool upload) that could be entirely replaced with (1) the public-bucket and (2) a tiny separate script that just nukes the bucket and repaves with fresh local builds15:22
fwereaderogpeppe, maybe my problem is derived from the name though... but surely the public source will always be the same for everybody? so, not necessarily a bucket, just a url prefix15:23
fwereaderogpeppe, and the only reason (that I can see) to make it configurable is for testing15:24
fwereaderogpeppe, have I just gone off into the weeds?15:24
fwereadeAram, stable, fwiw15:25
fwereaderogpeppe, I do need t be off now; I've left a tab open, it'll be the first thing I see when I come back :)15:30
fwereadelater :)15:30
rogpeppeAram: i use vanilla 12.0415:42
TheMueAram: I'm using stable (so now 12.04) as "production environment" in a VM and test unstable releases in another VM.15:43
AramI see.15:43
rogpeppefwereade: i don't know. maybe you're right and we should just strip all that stuff out.16:13
rogpeppeniemeyer: what do you think?16:13
niemeyerfwereade: You mean implementing the exact same logic as tool upload, but outside of juju?16:15
niemeyerrogpeppe: If that's what fwereade means, I'm not sure.. feels like we'll have the exact same trouble on both sides.. we're just delegating it to a second class citizen that is not as well integrated.16:19
rogpeppeniemeyer: i guess it would mean that we could do a simple uploader for each provider type without having to have all the --upload-tools flags and args to Bootstrap etc16:20
niemeyerrogpeppe: All? You mean two? :)16:20
rogpeppeniemeyer: :-)16:21
rogpeppeniemeyer: the logic for finding tools would be a little simpler too. only one Storage per environ.16:21
niemeyerrogpeppe: I don't have a strong feeling about it, but I'm not convinced it's getting us much. Having convenient mechanisms for people to develop juju itself feels like a valuable goal.16:22
niemeyerrogpeppe: How so? public-bucket is a storage16:22
niemeyerrogpeppe: And it has to exist for every single storage, despite uploading tools16:22
niemeyerrogpeppe: Because the real tool deployments uses the public storage too16:23
niemeyerrogpeppe: The only difference is that FindTools would look in a single storage, rather than in two. So 3 or 4 lines rather than 6 or 716:24
rogpeppeniemeyer: yeah, that's true. we need both regardless.16:24
rogpeppeniemeyer: did you take a look at the public-bucket branch, BTW?16:24
rogpeppeniemeyer: (i'm quite happy with the direction we're going actually. it's always good to try and take a step back and think "is this really the right way to do it?" though.)16:25
niemeyerrogpeppe: No, I had a look at a nice lunch just now :)16:25
rogpeppeniemeyer: cool. hope your weather is as nice as ours ...16:25
niemeyerrogpeppe: What's the public-bucket setting about?16:26
niemeyerrogpeppe: It's surprisingly good16:26
niemeyerrogpeppe: Feels like we're going back onto summer, even though it's quite the opposite16:26
rogpeppeniemeyer: public-bucket is where the provider looks for public storage.16:26
rogpeppeniemeyer: i.e. to get the publicly accessible tools downloads from16:26
niemeyerrogpeppe: Ah, nice16:27
rogpeppeniemeyer: perhaps in the future we might want to support a simple URL, so we don't have to host the binaries in EC2, but i think that a bucket should be ok for now. and it makes it easy to write to for testing purposes :-)16:27
niemeyerrogpeppe: Btw, are you seeing my messages in that thread with William?16:27
niemeyerrogpeppe: Or just William's?16:28
rogpeppeniemeyer: the "serve metadata and config" thread?16:28
niemeyerrogpeppe: Yeah16:28
rogpeppeniemeyer: yeah, i'm seeing them. although i haven't read it in a couple of hours16:29
niemeyerrogpeppe: Ok.. np16:29
niemeyerrogpeppe: negronjl seems to missing my messages that go to the list for some reason16:29
niemeyernegronjl: Apparently they're reaching the list, at least16:29
rogpeppeniemeyer: well, i *might* be missing some of your messages... :-)16:29
rogpeppeniemeyer: oh yeah, just seen negronjl's email. perhaps you count as spam :-)16:30
niemeyerrogpeppe: It might be half-right.. :-)16:31
negronjlniemeyer, rogpeppe:  lol ...16:31
negronjlniemeyer: I am checking my spam folder just to be sure ...16:31
rogpeppeniemeyer: while i remember... are we going to try to have monday meetings as planned?16:31
niemeyerrogpeppe: Yeah, we should16:33
niemeyerrogpeppe: This one might be a tricky one as I'll be in London, but let's make an effort at least16:33
rogpeppeniemeyer: does that mean three of us will all be in the UK at once? woo!16:34
negronjlnothing on my spam from niemeyer ....16:34
niemeyerrogpeppe: Unfortunately not.. William is back to Malta next week16:41
niemeyernegronjl: I really can't tell then.. maybe we should ask IS16:42
negronjlniemeyer: I'll ask16:42
niemeyernegronjl: Thanks, please let me know.. curious about what could be going on as well16:46
negronjlrt.admin.canonical.com #5319016:47
negronjlniemeyer: ^^16:47
niemeyernegronjl: Don't have access to it, but thanks.. let's see what they find17:01
rogpeppei'm off to enjoy the sunshine17:10
rogpeppesee y'all tomorrow17:10
niemeyerrogpeppe: Enjoy17:15
Aramhi davecheney.21:15
davecheneyhowdy21:15
=== meetingology` is now known as meetingology
niemeyerdavecheney: Morning22:53
davecheneymorning23:05
niemeyerdavecheney: 181 »       »       panic(fmt.Sprintf("configuration was %T, expected %T", cfg, new(23:18
niemeyer     providerConfig)))23:18
niemeyerdavecheney: That's not necessary23:19
niemeyerdavecheney: c, ok := cfg.(*providerConfig) => s/, ok//23:19
niemeyerdavecheney: The compiler can do that for us23:19
niemeyerdavecheney: Re-reviewed the branch, mentioned a couple of details, and LGTM23:27
davecheneyniemeyer: thanks, i'll finalise and submit later today23:54
davecheneyif you have time coudl you also take a look a the NewConfig banch23:54
davecheneybranch23:54

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