#ipfs

/

      • jbenet
        whyrusleeping: you'll need to squash in https://github.com/ipfs/go-ipfs/commit/f8b64c99... somewhere, because otherwise all tests wont pass.
      • we need the tests jenkins does on travis...
      • whyrusleeping
        wait... it runs race on all the commits?
      • thats total BS
      • jbenet
        whyrusleeping: oh, no it doesn't.
      • but why shouldnt it? if a race was introduced in a previous commit that's a problem.
      • (i understand dev-speed is an issue worth fixing, but not testing things for correctness is a bigger problem)
      • these aren't mutex-- just need right balance
      • i'll look into travis and see if we can do anything about spinning up multiple concurrent things
      • also, should mention that beaking up the repo into parts (net, routing, bitswap, mdag, core, etc) will likely make tests waaaay faster.
      • whyrusleeping
        if a race was introduced in a previous commit, but doesnt show up in the end, does that really matter?
      • i like having a verbose history, and not having all my commits squashed into "did thing"
      • jbenet
        whyrusleeping yes! we may revert the last commit and not realize it!
      • yeah i agree
      • whyrusleeping
        why would we do that. thats dumb
      • >.>
      • jbenet
        ideally git would have two kinds of commit-- a single increment of work, for history, and an atomic code change.
      • whyrusleeping
        that would be nice.
      • it kinda does with merge commits
      • anshukla has quit
      • jbenet
        yeah but then we need really really good culture to follow that pattern.
      • whyrusleeping
        especially if we stick to single bubble merges
      • jbenet
        likley not to happen with a large project with lots of people in and out
      • whyrusleeping
        hrmmmm
      • jbenet
        on the reverting-- it's already happened before. when you have a huge codebase, you cannot guarantee what people will notice or know about the state of things
      • whyrusleeping
        i just cant think of a scenario that would lead to that problem occuring
      • jbenet
        totally innocuous-looking things screw things up and it becomes very hard to figure out what happened when all the tests are suddenly failing.
      • whyrusleeping
        and ive worked on some pretty large codebases
      • jbenet
        with your PR, say we change our minds and want to remove the bwc get/setter on the host. we could totally take that commit and revert it. (or vv, since the commit introduces a race)
      • whyrusleeping
        but if we squash, we couldnt do that anyways
      • jbenet
        whyrusleeping: exactly right, which prevents that problem. it forces people to treat them as an atomic code change and makes them reason harder.
      • we dont have either a rigorous enough test suite nor rigorous enough CR, bad things sneak in often as it is, having a larger surface area for them to is problematic.
      • whyrusleeping
        so youre saying you dont want to be able to revert commits?
      • jbenet
        whyrusleeping: btw, check out how go team does commits-- i dont like it, but there's reason to their madness
      • whyrusleeping
        just trying to figure out what we want
      • jbenet
        (not really madness, just a good expr)
      • whyrusleeping afaik, the CLs there get applied as one commit on the history, no record of the branches is kept, etc.
      • whyrusleeping
        hrm... fine. ill just squash everything
      • whyrusleeping grumbles about his github commit graph
      • jbenet
        whyrusleeping: that's not what i mean either. :/
      • we should endeavor for "atomic code changes" given our current tools.
      • whyrusleeping
        alright, what do you want done?
      • jbenet
        your PR has a few that you can keep separate as desired, but just make sure all tests pass?
      • (sorry, in this case i dont particularly care, im just saying for commits in general in the future)
      • ok, let's say this:
      • - all commits must pass all tests. (including -race)
      • that's it.
      • whyrusleeping
        hrm... okay
      • jbenet
        btw-- it occurrs to me that we could get something like the "two kinds of commits: atomic code change, and increment of history" by making git rebase smarter
      • plato joined the channel
      • err git bisect*
      • and a few other tools i imagine.
      • anyway / yak shaving
      • whyrusleeping
        mmmkay, ill keep that in mind for the future
      • squashing this one now because fixing it is too much effort
      • hosh
        Wow. I can't believe that actually worked
      • Error: fusermount: "fusermount: option allow_root only allowed if 'user_allow_other' is set in /etc/fuse.conf\n", exit status 1
      • ipfsbot
        [13go-ipfs] 15whyrusleeping 04force-pushed 06feat/bw-meter from 14f8b64c9 to 14e64bc1c: 02http://git.io/j1M1
      • 13go-ipfs/06feat/bw-meter 14e64bc1c 15Jeromy: bandwidth metering on streams...
      • hosh
        ... and that failed. :-/
      • jbenet
        whyrusleeping: sounds good.
      • ipfsbot
        [13go-ipfs] 15jbenet 04force-pushed 06t0030_remove_expected_failures from 148254724 to 14e0c4638: 02http://git.io/jQRF
      • 13go-ipfs/06t0030_remove_expected_failures 14e0c4638 15Christian Couder: t0030: replace some expect_failure with expect_success...
      • whyrusleeping
        jbenet: where was the race at?
      • which package tests?
      • jbenet
        whyrusleeping: the bwc setter
      • whyrusleeping
        repro?
      • jbenet
        oh i doubt tests will pick it up
      • whyrusleeping
        go test ./XXX ?
      • jbenet
        but it _is_ a race.
      • you can probably write one
      • (we should write one :P)
      • zignig_ finishes moving jbenet -> ipfs for all his copies about the place.
      • zignig_ sorry :/
      • worst idea ever.
      • whyrusleeping
        the only potential race there is if we run ipfs on a 16 bit architecture and the pointer assignment takes more than a single cycle
      • or something stupid like that
      • plato has quit
      • like, i see how there could be a race.
      • the only good solution would be to separate the 'NewHost' call from the 'Start things' logic
      • zignig_
        all good , better to have it as ipfs, much as it is your baby, it make contribution more coherent.
      • whyrusleeping
        so: NewHost(), SetReporter(), host.StartThings()
      • zignig_ is back in civilization.
      • zignig_: you didnt get eaten by bugs?
      • zignig_
        thankfully no , although there were some close calls.
      • :)
      • hosh
        Ok, this is surprising... AllowRoot() doesn't work but AllowOther() does?
      • Vendan
        hrm, golang is rather heavy, 217mb for this from source static build I just made
      • whyrusleeping
        jbenet: i could make the options for the NewHost constructor just be interfaces
      • jbenet
        whyrusleeping: assigning to a pointer is not atomic. all over the go (and our) codebase we use locks to prevent this one race.
      • whyrusleeping: sure, that could work.
      • whyrusleeping
        and have the function check their types and act accordingly
      • jbenet
        whyrusleeping SGTM if that's easier for you. (kill the setter in that case)
      • whyrusleeping
        yeah
      • jbenet
        i really should run my daemon when i wanna show you things
      • omg
      • wow
      • that resolved.
      • after spinning up my daemon-- it reprovided
      • \o/
      • it never ceases to amaze me that all of this works so well
      • domanic joined the channel
      • whyrusleeping
        or, i could use atomic.StorePointer
      • >.>
      • jbenet
        (i pasted the image on irc cloud, it was stuck loading, 30s later i spun up my daemon. it finished loading.
      • whyrusleeping: sure, but you also have to use it on the getting side. i've been bitten by store ptrs more than locks, so i tend to use locks.
      • (we can probably do an optimizing pass on all those in our codeabse down the road-- for me it's premature optimization)
      • ipfsbot
        [13go-ipfs] 15hosh created 06hosh/fuse-mount-opts (+1 new commit): 02http://git.io/j5IA
      • 13go-ipfs/06hosh/fuse-mount-opts 14ac1448c 15Ho-Sheng Hsiao: Added fuse allow options...
      • whyrusleeping
        i'm not sure that you would have to use the atomic load for the Getter...
      • jbenet
        whyrusleeping: how annoyed ">.>"
      • how annoyed is ">.>"?*
      • whyrusleeping: i think that if you dont use the atomic getter it's a race. not sure.
      • whyrusleeping
        annoyed: 4/10, skeptical 8/10, lazy 6/10
      • well, if the only writes to it that happen are atomic
      • theres no possibility for a tear to occur
      • jbenet
        i doubt that's safe-- otherwise why would there be a LoadPointer?
      • ipfsbot
        [13go-ipfs] 15hosh opened pull request #997: Fuse allow options (06master...06hosh/fuse-mount-opts) 02http://git.io/j5L4
      • whyrusleeping
        for cases where there are lots of writes and you want to ensure your read is stable?
      • jbenet
        if the stores were atomic in respect to the reads
      • whyrusleeping
        you would protect the one that happens the least
      • jbenet
        no-- see that's the point, a single write will still cause a race
      • whyrusleeping
        alright, ill err on the side of paranoia and put it in both
      • jbenet
        ??? wat.
      • correctness should not be probabilistic.
      • Vendan
        if the read isn't atomic, couldn't an atomic write happen in the middle of the read?
      • whyrusleeping
        getter and setter, atomic load and store
      • jbenet
        ok
      • hosh
        jbenet: I am a bit stumped on https://github.com/ipfs/go-ipfs/pull/997 ... code looks like it works, but I can only mount ipfs with `allow_other` but not `allow_root`
      • jbenet
        hosh i'll take a look i need to take a call
      • (it will be a bit, i think)
      • hosh
        that's fine
      • ipfsbot
        [13go-ipfs] 15whyrusleeping 04force-pushed 06feat/bw-meter from 14e64bc1c to 147f25f57: 02http://git.io/j1M1
      • 13go-ipfs/06feat/bw-meter 147f25f57 15Jeromy: bandwidth metering on streams...
      • [13go-ipfs] 15jbenet pushed 2 new commits to 06master: 02http://git.io/j5mJ
      • 13go-ipfs/06master 14e0c4638 15Christian Couder: t0030: replace some expect_failure with expect_success...
      • 13go-ipfs/06master 149d7603e 15Juan Batiz-Benet: Merge pull request #926 from ipfs/t0030_remove_expected_failures...
      • whyrusleeping
        jbenet: 986 RFM?
      • as well as 987?
      • jbenet
        hosh: idk-- maybe it's a problem with docker? whyrusleeping thoughts?
      • whyrusleeping
        problem with docker?
      • youre talking about the allow_root thing?
      • hosh: what happens when you try to mount with allow root?
      • Vendan
        woot, 215mb docker image with golang in it
      • whyrusleeping
        Vendan: score!
      • Vendan
        now just to get git into it, so I can do a go get github.com/ipfs/go-ipfs
      • whyrusleeping
        and then delete git and go afterwards :P
      • Vendan
        plus, go is completely contained in /go, so once you've built stuff, rm -rf /go and you have a clean 4mb + your stuff image :)
      • lol yeah, that