Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t0080 improvements #2041

Merged
merged 2 commits into from
Dec 12, 2015
Merged

t0080 improvements #2041

merged 2 commits into from
Dec 12, 2015

Conversation

chriscool
Copy link
Contributor

This may not fix #2028.
But it might help us get more information when it fails.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
@jbenet jbenet added the status/in-progress In progress label Dec 5, 2015
@chriscool
Copy link
Contributor Author

Here is the (unrelated) Travis-CI failure in t0230:

expecting success: 

        mkdir -p testdir &&

        echo "hello test" >testdir/test.txt &&

        ipfs add -r testdir &&

        curl -i "http://localhost:$PORT_API/api/v0/refs?arg=QmTcJAn3JP8ZMAKS6WS75q8sbTyojWKbxcUHgLYGWur4Ym&stream-channels=true&encoding=text" >actual_output



No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

The build has been terminated

@chriscool
Copy link
Contributor Author

Circleci build also timed out but in t0040!

@rht
Copy link
Contributor

rht commented Dec 5, 2015

@chriscool t0080, t0043, t0081, t0160 all contain the tail -n1 race condition. Perhaps "ipfs add x then get the last hash" can be wrapped in a function.

@jbenet
Copy link
Member

jbenet commented Dec 6, 2015

Perhaps "ipfs add x then get the last hash" can be wrapped in a function.

yes, sounds like a good idea. we could also make this into another output mode for ipfs add, which only outputs the root hash. (it's a common enough occurrence that forcing | tail -n1 always is annoying). We could make -q do this, or use -qq*

  • @whyrusleeping another reason why -qq is not great for --silent. there may be degrees of quiet before silent

@jbenet
Copy link
Member

jbenet commented Dec 6, 2015

I'm sick of these osx travis failures. we need to find the problem and fix it.

@jbenet
Copy link
Member

jbenet commented Dec 6, 2015

@rht, wait

all contain the tail -n1 race condition.

whats the race condition?

@chriscool
Copy link
Contributor Author

@jbenet

we could also make this into another output mode for ipfs add, which only outputs the root hash. (it's a common enough occurrence that forcing | tail -n1 always is annoying).

Yeah, I think it's a good idea!

@rht I don't like ipfs cmd ... | something because it doesn't detect when ipfs cmd ... fails as by default the exit code of the whole expression is the exit code of something, the part after the pipe (|). (You can try false | true; echo $? in a shell to see that.)

@rht
Copy link
Contributor

rht commented Dec 6, 2015

@chriscool / @jbenet I see, I thought the cause of the fluctuating ipfs refs -r in https://github.com/ipfs/go-ipfs/pull/2041/files#diff-3300d84a935a8de682f5e1225c53b384L220 was due to a tail -n1 race condition, and making sure ipfs add -r -q . complete first was to avoid this.

@chriscool
Copy link
Contributor Author

Is there something that should be done on this?
The build failure are not related.

jbenet added a commit that referenced this pull request Dec 12, 2015
@jbenet jbenet merged commit 4397adf into master Dec 12, 2015
@jbenet jbenet removed the status/in-progress In progress label Dec 12, 2015
@jbenet
Copy link
Member

jbenet commented Dec 12, 2015

thanks @chriscool

@jbenet jbenet deleted the t0080-osx-fix branch December 12, 2015 09:31
@jbenet jbenet mentioned this pull request Dec 14, 2015
@rht
Copy link
Contributor

rht commented Dec 18, 2015

Found several errs of this type while stress testing in #2101, e.g. t0045 https://travis-ci.org/ipfs/go-ipfs/jobs/97678447 and one more in t0080 refs -r(#2028). At least in the t0045 case it is shown that some of the files don't get added.

@chriscool
Copy link
Contributor Author

Yeah, my commits in this PR haven't fixed the problem described in #2028. It really looks like a bug in ipfs add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

t0080-repo.sh fails on osx CI
3 participants