[06:37] <rogpeppe> mornin' all
[06:38] <rogpeppe> huwshimi: do you, by any chance, know the name/address of the calendar that we should add leave to?
[06:54] <dimitern> rogpeppe, morning
[06:54] <rogpeppe> dimitern: hiya
[06:54] <rogpeppe> dimitern: how's tricks?
[06:54] <dimitern> rogpeppe, I wanted to ask you for a while.. 
[06:55] <dimitern> rogpeppe, why do you usually send a mail twice to the same lists - once normally and once forwarding it to the same list? :)
[06:55] <rogpeppe> dimitern: because i very often forget to send it from my canonical address
[06:55] <dimitern> rogpeppe, ah :)
[06:56] <rogpeppe> dimitern: and i believe that it bounces when i send from my normal gmail address
[06:56] <rogpeppe> dimitern: so i *think* you'll see two messages only when you're directly CC'd
[06:56] <dimitern> rogpeppe, so godeps now does both fetching/pulling new revisions and go getting missing packages?
[06:56] <rogpeppe> dimitern: if you're seeing two messages otherwise, then perhaps i don't need to resend the messages after all...
[06:56] <rogpeppe> dimitern: yeah
[06:56] <dimitern> rogpeppe, nope, I always see 2 msgs
[06:57] <rogpeppe> dimitern: hmm, maybe that means that rogpeppe@gmail.com is actually subscribed to both
[06:57] <dimitern> rogpeppe, good, I'll give it a try to see if it solves my previous issues
[06:57] <dimitern> rogpeppe, most likely :)
[06:58] <huwshimi> rogpeppe: Hey, I'm not aware that there is one.
[06:58] <rogpeppe> dimitern: it doesn't always work, unfortunately, and i'm not quite sure why. there's something weird going on.
[06:58] <dimitern> rogpeppe, sorry about bashing godeps a bit in the msg I sent btw (^^)
[06:58] <rogpeppe> dimitern: hrmph :-)
[06:58] <rogpeppe> dimitern: it's open source and i develop it in my spare time - you're free to contribute too :-)
[06:58] <dimitern> rogpeppe, with git, you're using fetch rather than pull, right?
[06:59]  * rogpeppe checks
[06:59] <dimitern> rogpeppe, yep, I was thinking about it
[06:59] <rogpeppe> dimitern: it's not that big either - only 718 lines
[07:00] <dimitern> rogpeppe, I'll have a look at the source
[07:00] <rogpeppe> dimitern: i'm using pull. yeah, i should definitely use fetch there, i think.
[07:01] <dimitern> rogpeppe, yeah, it's safer - no changes to work dir
[07:01] <rogpeppe> dimitern: yeah, but... which remote to fetch?
[07:01] <rogpeppe> dimitern: i guess i could always fetch origin
[07:02] <rogpeppe> dimitern: ha, "origin" is the default anyway
[07:03] <dimitern> rogpeppe, with a properly set up local repo (i.e. as a result of go get or git clone), the remote is already implicitly defined, so just git fetch should work
[07:03] <dimitern> rogpeppe, that's what I'm using in my up-dep script for git repos
[07:03] <rogpeppe> dimitern: i'm not sure.
[07:03] <rogpeppe>        When no remote is specified, by default the origin remote will be used,
[07:03] <rogpeppe>        unless there’s an upstream branch configured for the current branch.
[07:04] <rogpeppe> so it's possible that someone might have configured an upstream branch
[07:04] <rogpeppe> i think just "git fetch origin" is probably the way forward
[07:04] <dimitern> rogpeppe, this can only happen if you're doing development on that dependency
[07:05] <rogpeppe> dimitern: yeah, but that might happen, i guess
[07:05] <dimitern> rogpeppe, i.e. have both origin and upstream remotes, like we have for juju/juju
[07:05] <rogpeppe> dimitern: yeah
[07:05] <dimitern> rogpeppe, and in that case it is still safer to fetch origin, as it should be configured on github to track upstream anyway
[07:05] <rogpeppe> dimitern: i actually never have an "upstream" remote - i think it's confusing
[07:06] <rogpeppe> dimitern: i just have "origin" and remotes named after the person
[07:06] <rogpeppe> dimitern: yeah, i think "origin" is probably the right thing to do, as we really want to fetch updates from the shared origin.
[07:07] <dimitern> rogpeppe, having upstream remote locally configured can help you looking for changes/logs/diffs between local branches/origin and upstream
[07:07] <rogpeppe> dimitern: does it make a difference that it's called "upstream" instead of "rogpeppe" ?
[07:08] <dimitern> rogpeppe, also, because I kinda don't trust github magically keeping my origin for up-to-date, I usually fetch upstream/master, push to origin/master, and pull origin/master into my local master
[07:08] <rogpeppe> dimitern: (i can never remember which way the "stream" flows, so "upstream" isn't a useful name for me)
[07:09] <dimitern> rogpeppe, no special meaning about the name
[07:09] <rogpeppe> dimitern: but upstream is configured to your own github fork, right?
[07:09] <dimitern> rogpeppe, :) it's even harder for me, as it different in bulgarian; but what I remembered is upstream=close to the original source :)
[07:10] <dimitern> rogpeppe, nope, upstream is the main juju/juju repo, origin is dimitern/juju (i.e. my github fork of the main repo)
[07:10] <rogpeppe> dimitern: oh, that's really weird then :-)
[07:11] <rogpeppe> dimitern: and that means that my proposed godeps fix would fail in your situation
[07:11] <rogpeppe> :-\
[07:11] <dimitern> rogpeppe, how so?
[07:11] <rogpeppe> dimitern: because it means that "git fetch origin" won't fetch any new updates that have been pushed by other people.
[07:12] <rogpeppe> dimitern: for me, origin is always the main repo that everyone forks from
[07:12] <rogpeppe> dimitern: that's automatically set up when i "go get" something
[07:12] <rogpeppe> dimitern: then i add a named remote for any fork
[07:13] <rogpeppe> dimitern: darn, i'm not sure that i can make automatic godeps fetching work in general then
[07:13] <rogpeppe> dimitern: assuming yours is a common pattern
[07:14] <rogpeppe> dimitern: i suppose i could fetch all
[07:21] <rogpeppe> dimitern: so do you usually configure your upstream as the default upstream remote for your branches?
[07:22] <rogpeppe> dimitern: if so (and assuming that's the common pattern), then perhaps i should just do "git fetch" (no args). i think that's probably better.
[07:23] <dimitern> rogpeppe, nope
[07:24] <rogpeppe> dimitern: oh
[07:24] <dimitern> rogpeppe, usually origin is the remote you cloned from
[07:24] <rogpeppe> dimitern: but do you usually clone from your fork, or from the original branch?
[07:24] <dimitern> rogpeppe, and in our workflow origin is you fork of the main repo in github, which is supposed to automatically track upstream
[07:25] <dimitern> rogpeppe, always from my fork, precisely for the reason origin tracks upstream
[07:25] <rogpeppe> dimitern: by "track" you mean that it automatically gets updates from its upstream branch?
[07:25] <dimitern> rogpeppe, yes, master is tracked by default, and you can add other tracking branches
[07:25] <rogpeppe> dimitern: (i.e. github does some magic behind the scenes to do that?)
[07:26] <rogpeppe> dimitern: i didn't know about tracking branches.
[07:26]  * rogpeppe googles it
[07:26] <dimitern> rogpeppe, that's the magic really - the fork is a local repo on github servers that has a master branch tracking upstream/master
[07:28] <rogpeppe> dimitern: so if you "git fetch" your fork repo, you should always get any changes that have been made upstream too?
[07:29] <dimitern> rogpeppe, that's how it's supposed to work - i.e. you're not expected to pull upstream/master into origin/master locally and then push to origin/master, but I do that, just in case :)
[07:31] <rogpeppe> dimitern: but... origin/master surely can't be the name of the remote tracking branch?
[07:31] <rogpeppe> dimitern: because that's where you've got your own changes
[07:32]  * rogpeppe experiments
[07:32] <dimitern> rogpeppe, well it is "remote" wrt your local repo, and it is also "remote" wrt upstream, in a different way :)
[07:33]  * rogpeppe is still confused :-)
[07:33] <rogpeppe> ... and i thought i had this git thing sussed :-)
[07:33] <dimitern> rogpeppe, locally, you have origin/master (I have upstream/master as well), both of these (locally speaking) are tracking branches for the origin and upstream repos
[07:34] <dimitern> rogpeppe, on github, where your fork lives, locally (there) origin/master is a remote tracking branch for the upstream repo (juju/juju)
[07:35] <rogpeppe> dimitern: so how would I refer to that remote remote?
[07:35] <dimitern> (i.e. origin/master@github tracks juju/juju/ master @github)
[07:35] <dimitern> rogpeppe, you don't need to
[07:36] <dimitern> rogpeppe, you need to track the place you cloned from (your fork), and your fork needs to track upstream, so 2 levels of indirection
[07:36] <rogpeppe> dimitern: so where's the HEAD reference to juju/juju master in my local repo?
[07:36] <dimitern> rogpeppe, unless you have an upstream remote to juju/juju, you don't have direct reference to the upstream/master HEAD
[07:37] <dimitern> rogpeppe, that's what I have: http://paste.ubuntu.com/8051647/
[07:37] <rogpeppe> dimitern: but you're saying that doing a "git fetch" of origin (my fork) will automatically fetch any commits that have been made upstream?
[07:38] <rogpeppe> dimitern: that's what i expected to see
[07:38] <dimitern> rogpeppe, yes, because origin tracks upstream
[07:39] <rogpeppe> dimitern: this is what mine looks like http://paste.ubuntu.com/8051665/ :-)
[07:40] <dimitern> rogpeppe, but I find this a little magical, so instead, I do: git checkout master (locally), git pull --ff-only upstream master (into my local master), git push origin master
[07:41] <rogpeppe> dimitern: i just can't quite work out where the references are kept locally. i.e. how are those double-remote tracking branches represented in my local repo?
[07:41] <dimitern> rogpeppe, hah :) interesting, but it's just different naming - your origin is actually my upstream, and your rogpeppe is like my origin
[07:41] <rogpeppe> dimitern: yeah
[07:41] <rogpeppe> dimitern: but that scales better
[07:42] <rogpeppe> dimitern: because i actually own quite a few github accounts
[07:42] <rogpeppe> dimitern: and it means that any repo that i've done "go get" with is already half set up for development
[07:42] <rogpeppe> dimitern: (i just need to fork it on github and add the "rogpeppe" remote)
[07:43] <dimitern> rogpeppe, I don't think it will scale as well if you need to have multiple origin remotes (say juju/juju and juju/names/ - you need to work on both at some point)
[07:43] <rogpeppe> dimitern: both of those will be in separate directories
[07:43] <dimitern> rogpeppe, no, sorry - yeah :)
[07:44] <rogpeppe> "there can only be one origin" :-)
[07:45] <dimitern> respect the origin for it shall prevail :)
[07:50] <rogpeppe> dimitern: hmm, i can't reproduce the behaviour you're expecting
[07:50] <dimitern> rogpeppe, which one?
[07:50] <rogpeppe> dimitern: it looks like doing a fetch of a github fork does not fetch commits made in the original master
[07:51] <rogpeppe> dimitern: so i did this experiment:
[07:51] <rogpeppe> dimitern: i forked a github repo (github.com/go-errgo/errgo) into my own git account (github.com/rogpeppe/errgo)
[07:52] <rogpeppe> dimitern: i cloned github.com/rogpeppe/errgo into a new directory
[07:52] <rogpeppe> dimitern: oops, no, scratch that!
[07:52] <rogpeppe> dimitern: i cloned github.com/go-errgo/errgo into a new directory
[07:52] <dimitern> rogpeppe, why the fork then?
[07:53] <rogpeppe> dimitern: i had another clone
[07:53] <dimitern> rogpeppe, you're supposed to clone the fork, not upstream for the tracking to work I think
[07:53] <rogpeppe> dimitern: with two remotes
[07:53] <rogpeppe> dimitern: github.com/go-errgo/errgo and github.com/rogpeppe/errgo
[07:54] <rogpeppe> dimitern: which i named origin and rogpeppe, according to my usual convention
[07:54] <dimitern> rogpeppe, ok
[07:54] <rogpeppe> dimitern: then, in the first cloned directory, i made a change, and pushed that (to github.com/go-errgo/errgo)
[07:55] <rogpeppe> dimitern: then in the directory with two remotes, i did "git fetch rogpeppe"
[07:55] <rogpeppe> dimitern: now that, if i understood you correctly, *should* have fetched the commit that was made in master
[07:56] <rogpeppe> dimitern: but it didn't
[07:56] <dimitern> rogpeppe, it depends what is the rogpeppe remote tracking
[07:56] <dimitern> rogpeppe, do git branch -r in the double-remote dir
[07:56] <rogpeppe> dimitern: the rogpeppe remote was tracking the fork (github.com/rogpeppe/errgo)
[07:56] <dimitern> rogpeppe, this will show you all remote tracking branches
[07:56] <rogpeppe> % git branch -r
[07:56] <rogpeppe>   origin/master
[07:56] <rogpeppe>   origin/v1
[07:57] <rogpeppe>   rogpeppe/master
[07:57] <rogpeppe>   rogpeppe/v1
[07:57] <dimitern> rogpeppe, ok, once upstream changed, if you go to rogpeppe/errgo does it show the commit (on github)
[07:57] <rogpeppe> dimitern: yeah, it says "This branch is 1 commit behind go-errgo:v1
[07:58] <rogpeppe> "
[07:58] <dimitern> rogpeppe, hmmm.. so maybe I don't get what "tracking" means :)
[07:58] <dimitern> rogpeppe, it doesn't pull revisions, just tells you if you need to
[07:59] <rogpeppe> dimitern: i think "tracking" just means that it refers to a remote repo; if you fetch it (explicitly), it'll get all branches from that (and by implication all the commits the HEADs of those branches refer to)
[07:59] <dimitern> rogpeppe, so what I'm doing with my "git sync" script - pulling upstream/master and pushing to origin/master is the right thing to do
[08:00]  * rogpeppe goes back to look at the sync script
[08:00] <dimitern> rogpeppe, heh :) what do you know - quite an interesting morning discussion, thank you
[08:01] <rogpeppe> dimitern: indeed - git is a complex beast, and noone quite understands it :-)
[08:03] <rogpeppe> dimitern: your sync script looks reasonable. but i'm not sure why you bother pushing to origin/master.
[08:05] <rogpeppe> dimitern: in general, i just use named branches in my github fork, and just use the original (my "origin", your "upstream") tracking branch as a source
[08:07] <dimitern> rogpeppe, I push to origin to make sure it's up-to-date (on github) with all upstream commits; that way I can always use either the github UI or git commands locally on origin for diffs etc.
[08:26] <rogpeppe> dimitern: i don't quite get that. what's an example command that you might run that needs origin/master pushed?
[08:26] <rogpeppe> dimitern: (i often don't have an rogpeppe/master branch at all, BTW)
[08:27] <dimitern> rogpeppe, like git difftool origin/master (or something)
[08:28]  * rogpeppe looks up git difftool
[08:32] <rogpeppe> dimitern: presumably you could always do "git difftool upstream/master" instead?
[08:32] <rogpeppe> dimitern: which i'm guessing more directly represents what you actually want to do
[08:50] <dimitern> rogpeppe, good point, yes
[08:53] <rogpeppe> dimitern: so, i've just changed godeps to use "git fetch" rather than "git pull"
[08:57] <dimitern> rogpeppe, cheers!
[11:03] <rick_h__> morning all
[11:04] <rick_h__> rogpeppe: I added the leave for you. It's the juju ui engineering calendar
[11:04] <rogpeppe> rick_h__: thanks a lot
[11:04] <rick_h__> np, went through and approved that stuff last night so should be good
[11:04] <rogpeppe> rick_h__: have you got a reference for that calendar? (i think calendars have email addresses, right?)
[11:04] <rick_h__> rogpeppe: looking
[11:05] <rick_h__> rogpeppe: just shared it out to you
[11:05] <rogpeppe> rick_h__: i think i'm seeing the standup entries because i'm subscribed to frankban's calendar :-)
[11:05] <rogpeppe> rick_h__: thanks
[11:05] <rick_h__> oh hmm, standup is different. You should see those. I thought I invited you to those
[11:05] <rick_h__> yea, standup should be on your own. You're an invited person
[11:07] <rick_h__> jujugui wife has a migraine this morning. I've got to take the boy into day care for her and then get her up to the urgent care. Will be a bit afk this morning. Email if you need anything
[11:08]  * rogpeppe tries to work out how to find a reference to the calendar so i can add it to mine
[11:09] <rogpeppe> hmm, reloaded and it seems to have added it
[11:09] <rogpeppe> calendars are a kinda black magic
[12:16] <rogpeppe> dammit, my headphones just broke
[12:17] <rogpeppe> ... and i thought they were so well built
[12:21] <rogpeppe> ha, i wondered why the charmstore charm wasn't responding as i expected
[12:21] <rogpeppe> it uses the old charm store by default!
[12:43]  * rogpeppe lunches
[13:12] <jrwren> rogpeppe: I think I should change the default to v4.
[13:28]  * rick_h__ is back around
[13:30] <jrwren> rick_h__: welcome back.
[13:30] <rick_h__> jrwren: thanks
[13:34] <rogpeppe> jrwren: sorry, i didn't see the git change in PR#2 (though to be fair it wasn't mentioned in the description)
[13:43] <kadams54> jujugui: Morning all. Has anyone done anything with CI this morning? I had a build late last night that froze up on one of the tests. Ended up killing it after 1.5 hours, but it seems like a process is still out there hanging onto a port. Subsequent builds are failing with "port in use" errors.
[13:46] <rick_h__> kadams54: it knew I was back and wanted to blow up on me 
[13:46] <rick_h__> kadams54: sec, looknig
[13:46] <kadams54> rick_h__: welcome back :-)
[13:47] <rick_h__> wheeee
[13:47] <rick_h__> kadams54: process killed
[13:47] <kadams54> THanks
[13:56] <rick_h__> morning hatch__ 
[14:06] <hatch__> mornin rick_h__ 
[14:07] <rick_h__> hatch__: pics finally made it up overnight https://www.flickr.com/photos/7508761@N03/
[14:07] <rick_h__> killed poor flickr's api lol
[14:07] <hatch__> haha nice!
[14:07] <rick_h__> had to restart it 4 times yesterday
[14:07] <hatch__> lol!
[14:07] <hatch__> why flicker and not, say G+?
[14:07] <rick_h__> G+ pissed me off when they did the picasa to G+ photos crap
[14:08] <rick_h__> they botched that hard core and so moved all my stuff to flickr
[14:08] <rick_h__> plus there's no G+ import from other apps/programs
[14:08] <hatch__> ahhh
[14:08] <rick_h__> I tend to find the highlights and upload them to G+ for easier/thinned out sharing
[14:08] <rick_h__> but takes more time
[14:08] <jrwren> rick_h__: ah, you did bring the wife. Where is the boy?
[14:08] <rick_h__> jrwren: he stayed at home! 
[14:08] <jrwren> rick_h__: excellent choice! :)
[14:08] <rick_h__> he's going on his first plane ride next week though. 
[14:09] <rick_h__> will be fun to see how that goes
[14:14] <hatch__> I've found kids are either pro's or absolutely horrible
[14:14] <hatch__> when it comes to flying
[14:14] <hatch__> (from my friends with kids)
[14:14] <rick_h__> lol
[14:15] <hatch__> they don't usually understand that they are going 600MPH 35,000 ft up
[14:15] <hatch__> lol
[14:19] <rick_h__> jrwren: do you have a card in progress?
[14:19] <rick_h__> jrwren: or the one charm one in review?
[14:20] <jrwren> rick_h__: not really. yes, that in review.
[14:20] <rick_h__> jrwren: cool, have a hacky friday project if you're interested
[14:20] <rick_h__> jrwren: meet back in standup?
[14:20] <jrwren> rick_h__: I'm sold. What do you have?
[14:20] <jrwren> rick_h__: ok
[14:21] <rick_h__> https://plus.google.com/hangouts/_/calendar/cmljay5oYXJkaW5nQGNhbm9uaWNhbC5jb20.t3m5giuddiv9epub48d9skdaso?authuser=1
[14:21] <rick_h__> bah, wrong one
[14:22] <rick_h__> https://docs.google.com/a/canonical.com/spreadsheets/d/1szaU3S4r72DRzDr9TAsMS57FJ8AUaN84q1ov2rNLxZ8/edit#gid=0
[14:26] <hatch> kadams54:  when you qa'd https://github.com/juju/juju-gui/pull/494 the issues I mentioned were still there?
[14:26] <rick_h__> https://juju.ubuntu.com/docs/charms-deploying.html#deploying-to-specific-machines-and-containers
[14:27] <hatch> I ask because huw pushed a commit 
[14:27] <kadams54> hatch: yeah, although since then I've QA'd the card that fixes container count
[14:27] <hatch> wait, what?
[14:27] <kadams54> https://github.com/juju/juju-gui/pull/499
[14:28] <hatch> so does #494 have to land before #499?
[14:28] <hatch> or the other way?
[14:28] <hatch> confused...
[14:28] <kadams54> I don't think it matters
[14:28] <kadams54> As long as they both land eventually :-)
[14:28] <hatch> oh it was an existing issue...
[14:29] <hatch> ok I'll pick up the second reviews on these and get them landed
[14:29] <kadams54> It does seem odd to me that we're calling bare metal "root container" but not incrementing the container count.
[14:29] <kadams54> Great
[14:29] <kadams54> It'll be nice to have all of these landed.
[14:29] <kadams54> FYI, I'm re-running the CI build for https://github.com/juju/juju-gui/pull/499
[14:29] <hatch> aye 
[14:29] <hatch> sounds good
[14:34] <hatch> in order to get my keybindings in ubuntu to be what I want it makes the OSX host completely unusable lol
[14:34] <hatch> looks like I'll have to investigate only modifying the keybindings in the vm
[14:35] <jrwren> other than caps lock as ctrl, I gave up on custom keybindings a decade ago :)
[14:40] <hatch> kadams54:  just fyi I'm not going to ship 494 until 499 lands and I can re-qa
[14:40] <kadams54> k
[14:41] <hatch> jrwren:  so I have caps as ctrl, alt as super, super as alt, plus some others I had to shift around to make that work :) 
[14:41] <hatch> command, option (in osx) etc
[14:41] <jrwren> hatch: I was about to say, "Sounds like a Mac"
[14:41] <hatch> jrwren:  well it is mac hardware :) 
[14:42] <hatch> but of course I use a PC keyboard which makes it even more complicated
[14:42] <jrwren> hatch: using a PC keyboard on a Mac was one of the most frustrating things I've ever done in my life. I hate macminis to this day largely as a result of that experience.
[14:43] <hatch> I'm thinking i need a new ergo keyboard and entirely remap it so that doing the ctrl+ combos aren't so messed up
[14:43] <hatch> lol
[14:43] <hatch> I remapped so that alt was cmd and super was option
[14:43]  * rick_h__ gets annoyed with my 'photo' air with the thinkpad external keyboard on it
[14:43] <hatch> then it was ok
[14:43] <rick_h__> damn 'command/option' crap
[14:44] <hatch> I was going to just keep fighting to get ubuntu on metal but then I coudln't qa in windows without booting into osx, running ubuntu and windows in a vm
[14:44] <hatch> so....yeah
[14:44] <hatch> tough life I suppose...
[14:44] <hatch> :)
[14:45] <hatch> kadams54:  do you have a good test run of #496?
[14:46] <kadams54> That'll be the next CI build, but no, not yet
[14:47] <hatch> ok np
[14:51] <jrwren> rick_h__: where would this matrix code go?
[14:52] <rick_h__> jrwren: in a spreadsheet, just put it in a doc for now and maybe we'll dump it to a doc or something once we go through it
[14:52] <jrwren> ok
[14:52] <rick_h__> jrwren: so we might add a doc/containers or osmething with the script, results, etc
[14:53] <hatch> jujugui call in 8, don't be late, rick_h__ is here now ;)
[14:53] <rick_h__> woot!
[14:58] <hatch> jujugui call in 2
[15:01] <rick_h__> antdillon: around for call?
[15:21] <hatch> allllright back to doin qa's
[15:22] <hatch> darn, looks like there is some conflicts
[15:28] <hatch> fixing, will issue a new pr
[15:44] <hatch> kadams54:  comments made to your PR
[15:44]  * kadams54 sticks his fingers in his ears.
[15:44] <kadams54> "La la la"
[15:46] <hatch> lol
[15:46] <hatch> +1'd with changes and qa ok
[15:47] <hatch> lol all of huw's branches are failing when landing because of conflicts and failing tests
[15:47] <hatch> I think they will have to wait until he gets in to get them fixed and landed
[15:47] <kadams54> :-(
[15:48] <kadams54> Lunch break for me
[15:54] <rick_h__> hatch: yea, I cut down the WIP limits on there. That was a few too many branches in review at once 
[15:56] <hatch> rick_h__:  I think it was just a symptom of huw combining cards
[15:56] <hatch> into branches
[15:56] <hatch> but probably not a bad idea :)
[16:23] <rogpeppe> rick_h__: what's do you think is a reasonable behaviour when an http PUT request partially succeeds? should we return an error http status, but have some indication of which things have succeeded in the response body; or should we return a 200 status, but have some indication of errors in the response body?
[16:24] <rick_h__> rogpeppe: I'd expect it to be some sort of 500 error with some information in the body. 
[16:25] <rick_h__> rogpeppe: how does one 'partially succeed'? 
[16:25] <rick_h__> e.g. we got the metadata but didn't finish getting a blob or something?
[16:25] <rogpeppe> rick_h__: if we've got a PUT to meta/any, it might involve several database writes; one or more may fail
[16:26] <hatch> imho the entire thing should fail (500)
[16:26] <rick_h__> rogpeppe: gotcha, hmm, so it might be more a 400 things vs a 500?
[16:26] <rogpeppe> hatch: i think i agree with that.
[16:26] <hatch> 400 - you screwed up, 500 - we screwed up :)
[16:26] <rick_h__> yea, I can get behind that. 
[16:26] <rick_h__> hatch: right, but that's what I mean. If they supply bad data for the 4th document and we fail it should be a 400 "bad request"
[16:27] <rogpeppe> rick_h__: yeah, that's a difficult one
[16:27] <rick_h__> hatch: but if we fail because of conflicting user, db issues of our own, timeout, etc that'd be more 500 on us
[16:27] <rogpeppe> rick_h__: the 4th document might have bad data, but the 5th document might have correct data but a db write error
[16:27] <rick_h__> but I do agree that I think we fail in some error code way, and try to make sure a subsequent request has a chance of succeeding
[16:27] <rick_h__> rogpeppe: right, but we'd return on first fail?
[16:27] <rick_h__> rogpeppe: vs trying to push on?
[16:28] <rogpeppe> rick_h__: we may not be able to do that
[16:28] <rick_h__> oh hmm, double sucky
[16:28] <rogpeppe> rick_h__: as we want to be able to this stuff concurrently
[16:28] <hatch> yeah it should and then roll back to a clean state
[16:28] <rogpeppe> hatch: we may not be able to roll back either (no transactions)
[16:28] <rick_h__> rogpeppe: yea, I think a safe default is a 500 with message info
[16:28] <hatch> rogpeppe:  right but you'll have to implement them in the Go side
[16:28] <hatch> you can't have a bunch of broken records in the db because the user supplied incorrect data 
[16:29] <rick_h__> rogpeppe: yea, we might need to be able to call out ids/records we know is in a fubar state or something
[16:29] <rogpeppe> hatch: if it's a db error, it's likely the database connection is down, so we'll be a bit stuffed if we try to roll back
[16:29] <rick_h__> rogpeppe: or else how does a subsequent api call not get back half rev 3 data and half rev 4 data?
[16:30] <rogpeppe> rick_h__: i think it should be possible to avoid anything getting in a fubar state
[16:30] <rick_h__> rogpeppe: cool, yea I'm +1 on starting with a 500 + message body
[16:30] <rogpeppe> rick_h__: sgtm
[16:30] <hatch> +1
[16:30] <rogpeppe> rick_h__, hatch: thanks
[16:36] <rogpeppe> only one other thing that concerns me: currently we are totally consistent when we send back an error response - it looks like {"Code": "something", "Message": "an error message"}. In this one case, we'd need to send back a set of errors, not just one. this makes me more inclined towards a different error code.
[16:37] <rogpeppe> the consensus from a brief glance at these search results seems to be that some kind of 200 response might be more appropriate: https://www.google.co.uk/search?q=http+status+partial+failure&oq=http+status+partial+failure&aqs=chrome..69i57.4301j0j7&sourceid=chrome&es_sm=93&ie=UTF-8
[16:37] <rogpeppe> specifically: http://stackoverflow.com/questions/8472935/http-status-code-for-a-partial-successful-request
[16:37] <rogpeppe> rick_h__, hatch: ^
[16:37] <hatch> rogpeppe:  the issue is that we shouldn't have a partial record created
[16:37] <rick_h__> rogpeppe: right, but in that case resending to users would be harmful
[16:38] <hatch> if you only create half of the required stuff it's going to cause issues
[16:38] <rick_h__> rogpeppe: while in our case, resetting the data should be ok and safe
[16:38] <rick_h__> rogpeppe: so there's no need to split out the next request to only supply data for docs 4 and 5 since 1-3 are already updated
[16:38] <rick_h__> rogpeppe: I think a partial update of a charm is a failed update
[16:38] <rick_h__> imo and all that
[16:38] <hatch> agree
[16:39] <rogpeppe> rick_h__: so we don't bother telling the client which elements of the bulk request have failed?
[16:39] <hatch> we have to do everything we can to maintain a quality data set
[16:39] <rogpeppe> rick_h__: we just say it all failed, even though some elements have actually succeeded?
[16:39] <rick_h__> rogpeppe: right, the message might contain some info, but we're not going to expose to them "don't bother sending fields x,y,z, they're ok
[16:39] <hatch> rogpeppe:  we would return the first thing that failed
[16:39] <rogpeppe> hatch: we don't necessarily apply them all sequentially
[16:39] <rick_h__> rogpeppe: the clients would have to be able to take that response, adjust a subsequent request, and submit again?
[16:40] <rogpeppe> rick_h__: well, they'd have that freedom
[16:40] <rick_h__> rogpeppe: right, but I think it's overkill for what we're doing
[16:40] <rogpeppe> rick_h__: or they could just send the whole request again
[16:40] <hatch> rogpeppe:  I'm confused, so you would leave partial incorrect data in the db?
[16:40] <rick_h__> rogpeppe: and a ton of client complexity for what win? request size?
[16:40] <rogpeppe> hatch: yes - i don't think there's any way around that possibiity
[16:40] <hatch> rogpeppe:  of course there is
[16:41] <rick_h__> hatch: welcome to document dbs sans transactions across docs :) 
[16:41] <rogpeppe> rick_h__: i'm just wary of saying to the client "this failed" when some changes have actually been made
[16:41] <hatch> no just because the db doesn't support it doesn't mean that the app layer cant implement it
[16:41] <rick_h__> rogpeppe: right, but the client requested "change this metadata on an object" and that failed to occur and the client should notify the user, give them the info to try again with the hopes they can succeed.
[16:42] <rogpeppe> hatch: if one change has been made, then the db connection goes down before you can make the next change, how're you gonna revert the first change?
[16:42] <rick_h__> and it's too much for me to hink clients will not just check '200 success' but '200 but hey, did every field get updated?'
[16:43] <rogpeppe> hatch: also, reverting the data is hard when you've got other concurrent clients. you might revert other clients' deliberate changes.
[16:43] <rogpeppe> hatch: because the only way of reverting is by writing some data that you retrieved some time ago, since when it might have changed.
[16:44] <hatch> rogpeppe:  so you have updated the db with bad data, now you go and request that data - oops the app fell over because of the bad data
[16:44] <rick_h__> hatch: we can work on methods of mitigating. 
[16:44] <rick_h__> hatch: let's concentrate on the initial question at hand. 
[16:44] <rogpeppe> hatch: i don't think that we'll ever update the db with bad data here
[16:45] <hatch> oh i thought the initial question was solved
[16:45] <hatch> :)
[16:45] <rick_h__> and we can debate ACID different :)
[16:46] <rick_h__> hatch: well, rogpeppe was showing us the other examples in stack overflow and we were discussing how this is a bit different
[16:46] <hatch> oh ok yeah 
[16:46] <rick_h__> anyway, on that note I definitely think an erorr code on a failed update is still appropriate. 
[16:46] <rogpeppe> rick_h__: this is different because we don't trust our clients? :-)
[16:47] <hatch> no the workload to implement it in every client is not worth it
[16:47] <hatch> imho
[16:47] <rogpeppe> (to read the docs and response body)
[16:47] <rick_h__> rogpeppe: this is different because redoing the work a second time in their case is 'ungood' 
[16:47] <rick_h__> rogpeppe: so I'd consider their case an exception to the rule vs a standard 
[16:50] <rogpeppe> rick_h__: there's just something that seems wrong in my bones about discarding error info like that, when one error might be "permission denied" and another might be "database failed", and the client would want to retry the latter but not the former.
[16:50] <rick_h__> I'm not saying throw away the info. I don't see why we can't work out getting the errors to the user
[16:51] <rick_h__> the only thing I'm against is a 200 when we know it failed 
[16:51] <rogpeppe> rick_h__: ah, ok.
[16:51] <hatch> rogpeppe:  the first is a 4** the second is a 5**
[16:51] <rick_h__> I'm all for getting good error to the user
[16:51] <rogpeppe> rick_h__: can we choose a different 500 error then?
[16:51] <rogpeppe> rick_h__: i guess we'd have to choose a number ourselves
[16:51] <rogpeppe> rick_h__: or... just encode it in the string i suppose
[16:51] <rick_h__> rogpeppe: yea, nothing else 'fits' I can see
[16:52] <rick_h__> where did you shoot me the current message object?
[16:52] <rick_h__>  {"Code":  "something", "Message": "an error message"}
[16:52] <rick_h__> so can we not update that in any way?
[16:52] <rick_h__> with a details key, or allowing Message to be a list?
[16:53] <rogpeppe> rick_h__: one possibility, which we've already explored a little way, is double-encoding json in the message
[16:53] <rick_h__> :(
[16:54] <hatch> so on submit you're going to wait untill all the 'transactions' are complete before returning to the user a list of the 'tasks' and their outcome?
[16:54] <rick_h__> hatch: so they're going to fiure off 4 workers to update 4 docs and when all 4 come back build a response
[16:55] <rogpeppe> hatch: yeah
[16:55] <rick_h__> hatch: it might be all 4 are good, 200, or 3 good, one bad with a message, or 1 good 3 bad with 3 messages
[16:55] <rogpeppe> rick_h__: allowing Message to be a list doesn't quite cut it.
[16:56] <hatch> rogpeppe:  can one transaction fail with a 400 while the other is a 500?
[16:56] <rick_h__> rogpeppe: k, I'm tempted to extend it a bit and say we have the code, a message "applying changes failed" and some details object that's more complex clients could use to provide the better list of feedback
[16:56] <rogpeppe> rick_h__: we actually want to return a map from id to error in some cases, and from id to endpoint to error in some others
[16:56] <rick_h__> rogpeppe: and for simple cases, the complex obj is just empty
[16:56] <rogpeppe> hatch: yeah
[16:57] <rick_h__> rogpeppe: but that's just what I would do. I can be talked into a different custom error code number or whatever
[16:57] <rogpeppe> rick_h__: i think that's probably a reasonable approach. need to think it through a little more.
[16:57] <hatch> I think this is all moot, the validation should happen prior to the db request so it will 400 before anything could 500
[16:58] <hatch> so you only have 2 options, 200 for all, or 400 for one+ (which makes the responce 400)
[16:58] <hatch> response*
[16:58] <rogpeppe> hatch: for example, consider a PUT to /v4/meta/extra-info/foo of {"precise/wordpress-23": "val1", "precise/badcharm": "val2"}
[16:59] <hatch> ok
[16:59] <rogpeppe> hatch: that makes it considerably less efficient (and it can still fail) because you've got two db round trips where you only need one, and the object might still have disappeared when you actually make the request
[17:00] <rogpeppe> hatch: (talking about pre-request validation there, BTW)
[17:00] <hatch> but what I'm saying is that you should know that precise/badcharm is a bad charm before making the db request
[17:00] <rogpeppe> hatch: you can't know that
[17:01] <rogpeppe> hatch: maybe it was good but when you actually do the request for real, it's been removed
[17:02] <hatch> *sigh*
[17:02] <hatch> lol
[17:02] <rick_h__> race condition turtles all the way down :)
[17:02] <rogpeppe> rick_h__: yeah.
[17:02] <hatch> sounds like wrong-tool-for-the-job syndrome 
[17:02] <rogpeppe> hatch: it's ok really.
[17:03] <rogpeppe> hatch: just treat them as independent requests, even though they're bundled up into one
[17:04] <hatch> ok so return a list of error messages (in whatever format) and the request response status would be 200 < 500 < 400 
[17:04] <hatch> so if they broke it, even if there is a 500, it returns a 400
[17:04] <hatch> it couldn't continue anyways because they did something wrong
[17:05] <hatch>  (we are still talking about the original request response code right? )
[17:05] <rogpeppe> hatch: there are different classes of "wrong"
[17:05] <rogpeppe> hatch: yeah
[17:05] <hatch> well, unrecoverable wrong is a 400
[17:06] <hatch> ok let me rephrase
[17:06] <hatch> when would we want to return a 500 if there is also a 400?
[17:06] <hatch> so they sent us bad data, and our db was down for example...
[17:06] <rogpeppe> i'm somewhat inclined towards rick_h__'s p.o.v. that we should only return a 200 if everything went according to plan
[17:06] <hatch> well yeah
[17:07] <hatch> I didn't know that was even off  the table lol
[17:07] <rogpeppe> and i think that if someone is generating bulk requests, they should be prepared to deal with the results
[17:07] <hatch> agreed
[17:08] <rogpeppe> hatch: well, that's what the SO post was suggesting (200 with result errors)
[17:08] <hatch> oh, no imho that's bonkers
[17:08] <hatch> :D\
[17:08] <hatch> :D
[17:08] <hatch> (I don't have strong beliefs at-all!)
[17:09] <hatch> rogpeppe:  I suppose in the case where it would be alright if only one succeded then maybe...but even then i'd be pretty far on the side of returning a 4/500
[17:10] <rick_h__> it makes sense in that case. If the api call sends emails out to users you don't want to resend to the same users again
[17:10] <rogpeppe> so i'm thinking that for a bulk request, you'll always get a 500 error, and you have to look at the error details to find your individual error codes
[17:10] <rick_h__> seems reasonable
[17:11] <hatch> rogpeppe: well.... what if they had 400 errors and no 500 errors?
[17:11] <hatch> so it was actually all their fault
[17:11] <rogpeppe> hatch: i don't think it matters that much
[17:11] <hatch> a 500 they may just re-submit the data even though it's faulty 
[17:12] <rogpeppe> hatch: they can determine that by looking at the individual codes
[17:12] <rogpeppe> hatch: which is logic they're going to have to write anyway
[17:13] <rogpeppe> hatch: so it actually simplifies both server and client code, i think
[17:13] <rogpeppe> hatch: (to have a single error code for a bulk request, that is)
[17:13] <rogpeppe> s/code/status/
[17:13] <hatch> ok I gotcha
[17:13] <hatch> agree
[17:13] <hatch> 200 or 500 with a list
[17:13] <rogpeppe> hatch: yeah
[17:14] <rogpeppe> hatch: and i will look into providing more arbitrary error objects in the error response
[17:14] <hatch> yeah It would be nice if there was an array of errors or the lke
[17:15] <hatch> I think rick_h__ mentioned that earlier 
[17:15] <rogpeppe> hatch: definitely. that's the plan (actually a map/object of errors)
[17:15] <hatch> what would the keys be? (curious)
[17:16] <rogpeppe> hatch: in the /meta endpoint, the requested ids. in the /meta/any endpoint, the requested "include" endpoints.
[17:16] <rogpeppe> hatch: and those can nest, i think
[17:16] <hatch> ahh ok cool
[17:16] <hatch> yeah +1's all around
[17:17] <rogpeppe> hatch: so you could do: PUT /meta/any with the body {"precise/wordpress-23": {"extra-info/foo": 123, "extra-info/bar": true}, "precise/bad-435": {"extra-info/ppp", 345}}
[17:17] <rogpeppe> hatch: and get the error response:
[17:19] <rogpeppe> oops, let's rephrase that
[17:19] <rogpeppe> {"precise/wordpress-23": {"extra-info/foo": 123, "bad-endpoint": true}, "precise/bad-435": {"extra-info/ppp", 345}}
[17:19] <rogpeppe> possible error response:
[17:21] <rogpeppe> {"Message": "partial failure", "Code": "partial failure", "Details": {"precise-wordpress-23": {"extra-info/foo": {}, "bad-endpoint": {"Message": "bad endpoint", "Code": "not found"}}, "precise/bad-435": {"extra-info/ppp": {"Message": "charm not found", "Code": "not found"}}}
[17:21] <rogpeppe> perhaps...
[17:21] <rogpeppe> i think that's the most complex scenario that there is
[17:22] <rogpeppe> anyway, i need to stop now :-)
[17:22] <hatch> looks easily parsable, although that would be a full failure :)
[17:23] <rogpeppe> hatch: not quite - "precise/wordpress-23/extra-info/foo" was successfully changed to 123...
[17:23] <rogpeppe> g'night all and happy weekends and mondays too.
[17:23] <hatch> night rogpeppe see ya tuesday
[17:24] <rogpeppe> hatch: see ya
[17:36] <jrwren> juju status nil pointer reference.  I'm good at breaking things.
[17:36] <rick_h__> hah
[17:39] <hatch> lol
[18:38] <lazyPower> hey hatch, question for you - is there already work being done to get ghost on series=trusty?
[18:39] <hatch> lazyPower: by work.....do you mean.....me not being lazy?
[18:39] <hatch> :D
[18:39] <lazyPower> your words not mine ^_^
[18:39] <lazyPower> apperance of lazyness is just applied efficiency
[18:40] <hatch> haha - tbh it deploys jsut fine on trusty I just need to make a repo for it
[18:41] <lazyPower> you also need tests
[18:41] <lazyPower> Amulet testing of the ghost charm would be pretty simple. just some config set validation, and port 2364 (default) validation w/ port change requests validation and it should be g2g.    Throw in a haproxy relationship verify the reverse:proxy relationship is g2g and sounds like a winner for trusty
[18:43] <hatch> oh yeah I need to learn amulet
[18:44] <jrwren> friday rant: juju drives me to drink.
[18:44] <rick_h__> jrwren: good day for it?
[18:44] <rick_h__> jrwren: anything we can help out with?
[18:45] <jrwren> rick_h__: just venting. I'm frustrated becuase I just wasted what feels like 2 hrs trying to make azure work.
[18:46] <jrwren> rick_h__: isn't juju supposed to read updated environments.yaml ? somehow I had a stale environments/azure.jenv
[18:46] <rick_h__> jrwren: yea, they're trying to remove environments.yaml
[18:46] <rick_h__> and the jenv is the true source of truth
[18:46] <jrwren> ah.
[18:47] <jrwren> that is too bad.
[18:48] <rick_h__> hopefully things will get better. Trying to get rid of the jenv as well. We'll see how that shakes out
[18:49] <jrwren> that will be sweet :)
[19:24] <hatch> Makyo:  hey any luck with the investigation of the multi unit removal?
[19:26] <Makyo> hatch, yeah, I don't think we have enough information for much other than an XXX Comment now.  We don't know how the modelIds will look, and we'll need to allow people to remove specific units if they're on specific machine constraints.
[19:26] <hatch> ahhh
[19:26] <hatch> that's a good point
[19:27] <hatch> darn - we really need that removal functionality :/ 
[19:27] <hatch> I mean, it's not HORRIBLE heh
[19:27] <hatch> but.....ya know
[19:29] <Makyo> Yeah, for sure.
[19:29] <Makyo> So let me push up real quick and get your opinion
[19:36] <Makyo> Pushed
[19:50] <hatch> checking
[19:51] <hatch> +1'd
[19:52] <Makyo> Will fix up that test, then
[20:07]  * rick_h__ heads out for the day
[20:07] <rick_h__> have a nice weekend all
[20:07] <hatch> you too, cya
[21:20] <hatch> man I'm just having no luck with the internets this week
[21:23] <jrwren> I'm off. Have a good weekend ya'll.
[21:34] <hatch> cya jrwren
[21:34] <hatch> you too