/srv/irclogs.ubuntu.com/2012/04/25/#juju-dev.txt

wrtpfwereade: review delivered. just a couple of documentation suggestions.11:39
fwereadewrtp, cool, tyvm11:40
fwereadewrtp, just one thing: It calls f.SetOutput(ioutil.Discard).11:42
wrtpfwereade: go on11:42
fwereadewrtp, would "It may call f.SetOutput(ioutil.Discard)." be acceptable?11:42
fwereadewrtp, it's the sense I was trying to convey in the original11:43
fwereadewrtp, or I could always make it call that and thereby get the simpler doc ;p11:43
wrtpfwereade: i'd maybe go for that11:43
fwereadewrtp, ...and more consistent behaviour, even if it doesn't matter much11:43
wrtpfwereade: exactly11:43
fwereadewrtp, sounds good, tyvm11:44
wrtpfwereade: cool11:44
fwereadewrtp, there's a trivial followup at https://codereview.appspot.com/6115048/ as well11:44
* TheMue would like to review too but is currently involved in correcting the German translations of the 12.04 press releases.12:06
TheMuewrtp, fwereade: moin btw12:06
wrtpTheMue: hiya12:06
wrtpfwereade: proposal for new method in the Environ interface:12:06
wrtp// UploadExecutables uploads the files in the12:06
wrtp// given directory to the environment. They will be12:06
wrtp// tagged with the given Juju version.12:06
wrtpUploadExecutables(dir string, version string) error12:06
wrtpfwereade: does that seem reasonable to you?12:07
TheMueSo, back from translation office. *lol*12:50
wrtpfwereade: did you see my UploadExecutable proposal?13:05
TheMuewrtp: Btw, I wondered why my state test was failing. But then I get aware that I have to install sshd. Has been a surprise first.13:10
wrtpTheMue: slightly surprising it's not installed by default, yes. did it give a decent error message, BTW?13:11
TheMuewrtp: Yes, it told me that it could not start sshd.13:12
wrtpTheMue: that's good!13:12
TheMuewrtp: So fix just has been a sudo apt-get ...13:12
TheMueniemeyer: moin13:19
niemeyerHeya!13:21
wrtpniemeyer: yo!13:34
wrtpniemeyer: possible addition to the Environ interface:13:35
wrtp// UploadExecutables uploads the files in the13:35
wrtp// given directory to the environment. They will be13:35
wrtp// tagged with the given Juju version.13:35
wrtpUploadExecutables(dir string, version string) error13:35
andrewsmedinawrtp: hi13:37
fwereadewrtp, sorry, I missed that earlier13:39
fwereadewrtp, shouldn't dir be calculated from version?13:39
wrtpfwereade: no, because dir is just a temp directory into which we've installed the go executables13:39
wrtpniemeyer, fwereade: a possible alternative:13:40
wrtp// UploadExecutables uploads a gzipped tar archive13:40
wrtp// containing juju executables read from r. They will be13:40
wrtp// tagged with the given Juju version.13:40
wrtpUploadExecutables(r io.Reader, version string) error13:40
wrtpbut i think i prefer the original.13:41
wrtpfwereade: perhaps i've misunderstood your comment though13:42
niemeyerwrtp: Hmm, sounds interesting, the latter feels better13:45
niemeyerwrtp: version shouldn't be a string, though13:45
niemeyerwrtp: UploadTools?13:45
niemeyerwrtp: as it goes onto tools/13:45
wrtpniemeyer: the reason i prefer the former is that it gives the environ the choice to deploy in a different form if desired (e.g. local provider could just copy the dir)13:46
wrtpniemeyer: UploadTools sounds good.13:46
wrtpniemeyer: why shouldn't version be a string?13:46
niemeyerwrtp: I don't see how that's the case with the first and not the second13:46
wrtpniemeyer: the second one requires the executables to be tarred and gzipped already13:47
wrtpniemeyer: the first one just assumes that there's a directory containing them (as made by GOBIN=$dir go install launchpad.net/juju/go/cmd/...)13:47
fwereadewrtp, no, it was my misunderstanding13:47
niemeyerwrtp: Sounds sane.. I'd prefer to have that consistent13:47
niemeyerwrtp: There's no reason to have each environment with a different scheme13:48
wrtpniemeyer: ok.13:49
niemeyerwrtp: The alternative would be to reimplement the uploading logic everywhere, and then having to figure how each does what13:49
niemeyerwrtp: The consistency also makes it easier to have the other side consistent too (the consuming bit)13:50
wrtpniemeyer: i was thinking that there would be a function Archive(w io.Writer, dir string) which would do the tar & gzip13:50
wrtpniemeyer: then it's trivial for an environ to use it if it wants13:50
niemeyerwrtp: Until we figure why it would not want, this feels counterproductive13:51
wrtpniemeyer: one thing: you said that S3 doesn't count the file as uploaded if the network connection is interrupted. but what if the uploading client is interrupted (e.g. with ^C) ?13:52
niemeyerwrtp: That's what I did13:52
wrtpniemeyer: that's fine.13:52
wrtpniemeyer: hmm, so how does S3 know?13:53
niemeyerwrtp: http has a Content-Length header on the upload side too13:53
wrtpniemeyer: ah yes, i'd forgotten that.13:53
wrtpniemeyer: so, maybe the signature should be: UploadExecutables(r io.Reader, length int64, version string) error13:54
niemeyerwrtp: +113:54
niemeyerwrtp: Except for version.. it should be a Version IMO13:54
wrtpniemeyer: ok13:55
wrtpniemeyer: so... if we have a --force-upload flag, how can we tell the environ to bootstrap with the just-uploaded tools?13:56
niemeyerwrtp: We'll be sending the current version from the client.. we can use that to decide what to do13:58
niemeyerwrtp: We might also have a flag next to it.. something like "latest compatible" vs. "exact"13:58
wrtpniemeyer: but if the current version comes from a global variable, it won't be changing each time13:58
wrtpniemeyer: we could have an overriding environment variable13:58
niemeyerwrtp: Indeed.. what are you foreseeing there?13:58
wrtpniemeyer: i'm forseeing changing some code (but not the version) and uploading. i want that to work.13:59
wrtpniemeyer: rather, i don't want it to clash with other people using the same version.13:59
niemeyerwrtp: That sounds fine, that's what --force-upload would do, right?14:00
wrtpniemeyer: or are you envisaging everyone using a different bucket?14:00
niemeyerwrtp: Or --upload-tools, maybe14:00
niemeyerwrtp: Ah, yeah, definitely14:00
niemeyerwrtp: That was in the ML proposal14:00
niemeyerwrtp: There's a well known $PUBLIC, but in development mode it'd upload to your own bucket14:01
wrtpniemeyer: and that bucket comes from the environment.yaml, right?14:02
niemeyerwrtp: Right14:03
niemeyerwrtp: It's the same thing as the provider storage14:03
wrtpniemeyer: that should work. we can just use the existing control-bucket, i guess14:04
niemeyerwrtp: That's also the same thing as the provider storage :-)14:04
wrtpniemeyer: ok, just making sure i understand.14:04
niemeyerwrtp: Cool14:04
wrtpniemeyer: so --upload-tools triggers dev mode ?14:04
niemeyerwrtp: It's a bit unfortunate actually, that it's a common namespace14:04
niemeyerwrtp: We could have done better than that otherwise14:04
niemeyerwrtp: Hmm, good question.. what else would the dev mode affect?14:06
wrtpniemeyer: i can't think of anything else.14:06
niemeyerwrtp: Maybe we should handle that side of it as a feature on its own then14:06
wrtpniemeyer: i think --upload-tools *is* dev mode for all intents and purposes14:06
niemeyerwrtp: Just always check the provider storage before $PUBLIC on deployments14:06
niemeyerwrtp: and join the versions found for purposes of deployment.. then, pick the right version considering "exact" vs. "latest", and deploy the right one wherever it is14:07
wrtpniemeyer: i'm not sure i understand. if you've just uploaded the tools, why do you need to check anything other than provider storage for an exact match?14:09
wrtpniemeyer: or are you suggesting that normal user deplyments check their provider storage too?14:09
niemeyerwrtp: The fact the tools were uploaded sounds orthogonal to whether it is used, yeah.. When we don't upload the tools, what do we want to happen?14:10
wrtpniemeyer: that's a good question.14:10
wrtpniemeyer: i think that the tools should be chosen once, and then stored in the zk state14:10
wrtpniemeyer: (to be changed later if we want to upgrade)14:10
niemeyerwrtp: I'm not sure, only because the matrix is wider14:11
niemeyerwrtp: It's quite possible that different Ubuntu releases and architectures may be forced onto a specific version based on availability14:11
wrtpniemeyer: ah, but if we're uploading to the same URL each time, we have a problem, because we haven't got a good handle on the unchanging tools archive.14:11
wrtpniemeyer: hmm, that's true. but what should --upload-tools do in that case?14:12
wrtpniemeyer: if we can't use the version we're trying to upload, that is14:13
niemeyerwrtp: That's the thing, it feels like it's orthogonal.. it'd just cause the version in use to be sent to the environment storage14:13
wrtps/we'retrying to upload/we've just uploaded/14:13
niemeyerwrtp: Everything else works the same14:13
niemeyerwrtp: Then we have to define that everything else to be sensible, of course14:13
wrtpniemeyer: i'm not quite sure what you're suggesting here. that --dev-mode triggers exact version matching?14:15
niemeyerwrtp: No, I'm suggesting that this is orthogonal to the storage provider.. there are two different things: whether to upload the tools, and whether to enforce specific version matching or be lax14:17
niemeyerwrtp: So, just for the sake of understanding: bootstrap --upload-tools vs. bootstrap --exact-version vs. bootstrap --upload-tools --exact-version14:18
wrtpniemeyer: would there ever be a case where you'd want to do --upload-tools without --exact-version?14:19
niemeyerwrtp: Yes, in the cases where I'm happy for juju to pick a different version to enable me to work with other architectures, for example14:19
wrtpniemeyer: even though the version you've uploaded might well be ignored?14:20
wrtponly if there's a later uploaded version, i suppose14:20
wrtpi'm slightly nervous about having multiple deployed units all with different versions14:21
wrtpbut i suppose it's an inevitable consequence of our versioning strategy14:21
wrtp*maybe*14:22
niemeyerwrtp: I understand and agree.. it's not even a consequence of our versioning strategy.. both of these aim at solving the problem which is supporting software for half a decade in multiple releases of the OS14:22
niemeyerwrtp: and in multiple architectures14:22
niemeyerwrtp: Practical example:14:22
niemeyerwrtp: 12.10 ships with juju 2.0.0.. then, we find an important bug, and release 2.0.1.. do we want the guy that is using the client of 2.0.0 because he happened to stumble upon the CD to deploy 2.0.0 or 2.0.1? I'd prefer if the servers were running 2.0.1, even if the version doesn't match14:24
wrtpniemeyer: yes, i agree. however, the scenario we were talking about was in development mode. i *think* i'd prefer --upload-tools to force my current version, even if it might not succeed on some architectures.14:26
niemeyerwrtp: Fair enough, I'm happy to start from there, with --upload-tools implying --exact-version14:27
wrtpniemeyer: so we give bootstrap a new exactVersion argument?14:29
niemeyerwrtp: +114:29
wrtpniemeyer: and Startinstance, presumably14:30
niemeyerwrtp: Actually, why don't we just start from there and ignore the other behavior for the moment?14:30
wrtpniemeyer: just use a given version; no compatibility comparisons?14:30
TheMueniemeyer: Beside an updated https://codereview.appspot.com/6120045/ I just proposed https://codereview.appspot.com/6111053/ containing only the NeedsUpgrade change (based on the trunk this time ;) )14:30
niemeyerwrtp: Yeah, I *think* it'd be easy to get going with that, and then once the straightforward works, increment with a non-exact feature14:31
niemeyerwrtp: We can even switch the default without much pain, I suppose14:31
wrtpniemeyer: sounds good.14:31
niemeyerwrtp: Otherwise we'll end up stumbling upon several issues before we even have anything working14:32
niemeyerTheMue: Awesome, will try to review that now before lunch14:32
wrtpniemeyer: so, what should i do about the versions package? it pretty much implements semantic versions as specified on semver.org, so perhaps i should just take out the Compat func (which is juju-specific) and leave the rest, and use it just for the parsing and not the comparison.14:33
TheMueniemeyer: Great, thx14:33
niemeyerwrtp: IMO, it should be greatly simplified14:33
wrtpniemeyer: ok. you don't think it's useful having a standard semantic versions implementation?14:34
niemeyerwrtp: What we need is type Version stuct { Major, Minor, Patch int }14:34
wrtpniemeyer: ok, no pre-release, patch etc14:34
niemeyerwrtp: and a version.Parse that returns it14:35
wrtpi might just put the original onto rog-go.googlecode.org, as it's potentially useful for someone.14:35
wrtpniemeyer: sounds good.14:35
niemeyerwrtp: Agreed, not disagreeing with your generic design of semantic versioning itself14:35
wrtpniemeyer: it *is* pretty darn complex for what it gives you :-)14:36
niemeyerwrtp: Yeah14:36
niemeyerwrtp: func (v Version) IsDev() bool <= might be useful14:37
wrtpniemeyer: +114:37
wrtpniemeyer: (although i still think the odd-numbered versions will seem odd to people: "We've just released version 2.0.0 of juju" "But what happened to 1.0.0?!")14:38
niemeyerwrtp: odd/even is not so uncommon, and as long as we have the proper mechanisms in place in terms of code, no real damage can happen I suppose14:39
niemeyerwrtp: e.g. upgrade-juju shouldn't jump from stable to dev without a flag14:40
wrtpniemeyer: yeah, it's just a bit weird from a PR perspective. but if it's not uncommon, that's fine.14:40
* TheMue loves LGTMs14:41
niemeyerwrtp: http://en.wikipedia.org/wiki/Software_versioning#Odd-numbered_versions_for_development_releases14:41
niemeyerTheMue: ;)14:41
wrtpniemeyer: i can't see anything that does that on odd-numbered major releases.14:45
wrtpniemeyer: case in point: http://en.wikipedia.org/wiki/GNOME#Versions14:46
niemeyerwrtp: That doesn't bother me too much.. the main point of the odd major is being able to test the major upgrades before releasing them14:47
wrtpniemeyer: i'm sure it'll work out14:48
TheMueniemeyer: I would like to move all watchers into a new file "watchers.go" and rename "watch_test.go" to "watchers_test.go". OK for you?14:57
wrtpTheMue: one though: i think singular works just as well as plural, if not better. i'd suggest "watcher.go" and "watcher_test.go".14:59
wrtps/though/thought/14:59
TheMuewrtp: I think you have the better language feeling than me, so it would be ok for me to take "watcher", yes.15:00
niemeyerTheMue: Review delivered, cheers15:04
niemeyerTheMue: Yes, fine to move them elsewhere, as long as its in a branch by itself15:05
niemeyerTheMue: Hard to review moving code15:05
* niemeyer => lunch, biab15:05
TheMueniemeyer: Thx for the power reviewing. :D15:05
TheMueniemeyer: Yes, it will be an own branch.15:05
TheMueniemeyer: Enjoy15:06
wrtpniemeyer: i've updated the version CL taking into account our discussions above: https://codereview.appspot.com/608204415:57
niemeyerwrtp: Done16:14
wrtpniemeyer: submitted. thanks a lot.16:21
niemeyerwrtp: np!16:27
wrtppwd16:31
niemeyerwrtp: I now realize that ClientVersion is probably not correct.. this should be version.Current I think16:37
wrtpniemeyer: +116:37
wrtpniemeyer: will do16:37
niemeyerwrtp: Thanks!16:37
wrtpfwereade: ping17:29
fwereadewrtp, pong21:29

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