Skip to content

Improve stdin parsing - #1238

Merged
whyrusleeping merged 7 commits into
masterfrom
improve-stdin-parsing
May 18, 2015
Merged

whyrusleeping merged 7 commits into
masterfrom
improve-stdin-parsing

Conversation

@chriscool

Copy link
Copy Markdown
Contributor

This should fix issue #1141 (ipfs cat "multihash too short" error when using stdin).

chriscool added 2 commits May 17, 2015 20:34
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This should fix issue #1141 (ipfs cat "multihash too short"
error when using stdin) and perhaps others.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
@jbenet jbenet added the status/in-progress In progress label May 17, 2015
@chriscool

Copy link
Copy Markdown
Contributor Author

Some tests failed with:

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

and one with:

FAIL    github.com/ipfs/go-ipfs/routing/dht

Comment thread commands/cli/parse.go

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure this works with all commands-- do we have a case where we use both arguments AND stdin? maybe some of the ipfs object put type things? (although those commands are not very intuitive right now, so perhaps they can change)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general, this part of the cmdslib is a bit of a mess. ideas to clean it up would be great.

chriscool added 4 commits May 17, 2015 23:14
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This should fix issue #1196 (Can't launch a command line
process from Qt).

The check was bad because it took stdin into account,
but it really shouldn't.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
@jbenet

jbenet commented May 17, 2015

Copy link
Copy Markdown
Member

@whyrusleeping PTAL?

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
@chriscool
chriscool force-pushed the improve-stdin-parsing branch from 499f8d6 to 275ec7c Compare May 17, 2015 22:28
@chriscool

Copy link
Copy Markdown
Contributor Author

@jbenet @whyrusleeping I just added more improvements, tests and a fix for issue #1196 (Can't launch a command line process from Qt).
ipfs object put is a command like "stdinenablednotvariadic" in 275ec7c so there are now tests for commands like it too.
And there are now tests for commands than can take both an argument and stdin too (see tests for "stdinenabled2args" and "stdinenablednotvariadic2args").

@chriscool

Copy link
Copy Markdown
Contributor Author

The errors in Travis are the same "No output has been received in the last 10 minutes..."

@whyrusleeping

Copy link
Copy Markdown
Member

@chriscool this LGTM, those travis failures are strange, but not your fault.

@jbenet

jbenet commented May 18, 2015

Copy link
Copy Markdown
Member

rerunning---

We are using the KVM setup-- which is faster-- though is still beta.

@whyrusleeping

Copy link
Copy Markdown
Member

we should either set the go test timeout to 9 minutes, or the travis test timeout to 11 minutes, its hard to tell whether things broke because travis, or if things broke because one of our tests hung

@jbenet

jbenet commented May 18, 2015

Copy link
Copy Markdown
Member

@whyrusleeping sgtm

@chriscool

Copy link
Copy Markdown
Contributor Author

There are still the same kind of failures in some go tests:

*** Test killed with quit: ran too long (10m0s).
FAIL    github.com/ipfs/go-ipfs/merkledag   600.012s

and

--- FAIL: TestBootstrap (0.89s)
    dht_test.go:314: connecting 30 dhts in a ring
    dht_test.go:77: dial attempt failed: misdial to <peer.ID Y91TvF> through /ip4/127.0.0.1/tcp/41134 (got <peer.ID dTyTNY>)
18:47:07.334 CRITI   boguskey: TestBogusPrivateKey.Sign -- this better be a test! key.go:54
FAIL
FAIL    github.com/ipfs/go-ipfs/routing/dht 3.503s

whyrusleeping added a commit that referenced this pull request May 18, 2015
@whyrusleeping
whyrusleeping merged commit ae92955 into master May 18, 2015
@whyrusleeping whyrusleeping removed the status/in-progress In progress label May 18, 2015
@jbenet
jbenet deleted the improve-stdin-parsing branch May 18, 2015 20:14
chriscool added a commit that referenced this pull request May 22, 2015
This issue has been fixed by merging PR #1263 or PR #1238.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
chriscool added a commit that referenced this pull request May 22, 2015
This issue has been fixed by merging PR #1263 or PR #1238.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
@wking wking mentioned this pull request Jun 12, 2015
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.

3 participants