Commit Graph

4148 Commits

Author SHA1 Message Date
Christian Couder
942e96400b parse: fix parsing stdin args
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-17 23:43:24 +02:00
Christian Couder
5503c4cc89 parse_test: improve error messages
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-17 23:14:08 +02:00
Christian Couder
97ab64af30 parse: don't use stdin if there are arguments
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>
2015-05-17 21:19:12 +02:00
Christian Couder
ff9cb9ecf4 parse_test: test multiline stdin
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-17 20:34:40 +02:00
Juan Batiz-Benet
88be96bc8c Merge pull request #1229 from timgws/tiny-doc-update
Fix documentation on swarm connect.
2015-05-14 21:52:20 -04:00
Juan Batiz-Benet
cb7c82845e Merge pull request #1220 from ipfs/travis-test-all-commits
Get travis to test all commits
2015-05-14 15:14:30 -04:00
Juan Batiz-Benet
66fad5f1d7 Merge pull request #1230 from ipfs/peerstream-update
go-peerstream update (accept concurrency)
2015-05-13 03:43:00 -04:00
Juan Batiz-Benet
d25147d042 go-peerstream update (accept concurrency)
8d52ed2801
2015-05-13 02:59:43 -04:00
Tim Groeneveld
26ba3e1f74 Issue #873. Thought I might do a small change first to get my feet wet. 2015-05-13 08:15:00 +10:00
Juan Batiz-Benet
ad9d84d534 Merge pull request #1215 from eris-ltd/cors
Add CORS middleware handler to the API.
2015-05-12 06:17:24 -04:00
Juan Batiz-Benet
414ab63696 Merge pull request #1227 from ipfs/parallelize-handshake
net/p2p + secio: parallelize crypto handshake
2015-05-12 06:16:14 -04:00
Juan Batiz-Benet
482a492ab0 travis-ci: make test_all_commits
After losing jenkins, it's been difficult to test all commits
manually. This commit adds a Makefile target that makes travis do it.
Unfortunately, this is way too slow. It takes longer than the
allotted 10min.

After asking the travis people what to do, someone suggested making
sure that each commit is pushed to github independently. This makes
travis run CI on every single commit in the PR, and gives us nice
status indicators on each one (so we know which ones did not pass).

This approach means that we need to push a branch to the repo for
each commit in the PR-- otherwise travis may cancel its run if it
detects that the branch is no longer there. We could automate this
with a bot that essentially does:

  for each PR:
    git fetch the PR branch
    push a branch per commit: <branch>-<commit>

  for each closed PR:
    delete all branches with pattern <branch>-<commit>
2015-05-12 05:57:53 -04:00
Juan Batiz-Benet
0c8a0975c0 Merge pull request #1221 from ipfs/unrestricted-api-access
Add option to allow unrestricted API access
2015-05-12 05:56:00 -04:00
Juan Batiz-Benet
b84fa2b493 net/p2p + secio: parallelize crypto handshake
We had a very nasty problem: handshakes were serial so incoming
dials would wait for each other to finish handshaking. this was
particularly problematic when handshakes hung-- nodes would not
recover quickly. This led to gateways not bootstrapping peers
fast enough.

The approach taken here is to do what crypto/tls does:
defer the handshake until Read/Write[1]. There are a number of
reasons why this is _the right thing to do_:
- it delays handshaking until it is known to be necessary (doing io)
- it "accepts" before the handshake, getting the handshake out of the
  critical path entirely.
- it defers to the user's parallelization of conn handling. users
  must implement this in some way already so use that, instead of
  picking constants surely to be wrong (how many handshakes to run
  in parallel?)

[0] http://golang.org/src/crypto/tls/conn.go#L886
2015-05-12 05:54:09 -04:00
Juan Batiz-Benet
08ea56ce72 Merge pull request #1191 from ipfs/refactor/httpGateway
Refactor/http gateway
2015-05-11 14:43:46 -04:00
Kristoffer Ström
30f674af0e Add option to allow unrestricted API access 2015-05-10 22:25:36 +02:00
David Braun
496e7a4b2c Vendor CORS library. 2015-05-10 10:58:37 -07:00
Henry
4537311f59 http gw: disable PUT and writable tests - again... :( 2015-05-10 15:30:12 +02:00
Juan Batiz-Benet
e67c2a7b14 version bump to 0.3.4
(I'll add the changelog later today)
2015-05-10 09:23:47 -04:00
Juan Batiz-Benet
73e3e90cd9 simple ipns-republish script stopgap 2015-05-10 09:23:12 -04:00
Juan Batiz-Benet
fc8d225806 Merge pull request #1219 from ipfs/refactor/httpGateway-quickfix
Refactor/http gateway quickfix (1191)
2015-05-10 08:55:22 -04:00
Juan Batiz-Benet
2879c54da3 travis: use the KVM setup
travis is experimenting with a setup using KVM, instead of
independently provisioned VMs. It promises to be much faster. We're
testing it out.
2015-05-10 08:28:35 -04:00
Juan Batiz-Benet
c946dbede3 sharness: randomize swarm address too.
This may take care of the daemon clashing on travis.
2015-05-10 08:28:35 -04:00
Juan Batiz-Benet
6dd8aeb00a config set: allow arbitrary json input
This commit allows arbitrary json input to set.
It also tests this with sharness.
2015-05-10 08:28:35 -04:00
Henry
87ce7abe47 unixfs/io: added NewEmptyDirectory()
some golinting along the way
2015-05-10 07:36:28 -04:00
Henry
31b83abfe4 http gw: remove newDagEmptyDir helper 2015-05-09 12:19:57 +02:00
Henry
96846358cc http gw: some golinting and unexport unused symbols
- NewDagReader() used the wrong context
- Ip?sPathPrefix isn't used anywhere
- a little bit of error handling cleanup
2015-05-09 12:19:57 +02:00
Henry
1502f6bc71 http gw: removed ResolvePath() in favour of core.Resolve() 2015-05-09 12:19:57 +02:00
Henry
e633250c38 http gw: remove unused interface 2015-05-09 12:19:57 +02:00
Juan Batiz-Benet
d6fc414b64 Merge pull request #1212 from wking/fix-recursive-path-resolution
path/resolver: Fix recursive path resolution
2015-05-09 01:10:36 -04:00
W. Trevor King
19823c6704 path/resolver_test: Test recursive Link resolution
Setup a three-level graph:

  a -(child)-> b -(grandchild)-> c

and then try and resolve:

  /ipfs/<hash-of-a>/child/grandchild

Before 10669e8b (path/resolver: Fix recursive path resolution,
2015-05-08) this failed with:

  resolver_test.go:71: no link named "grandchild" under QmSomeRandomHash

The boilerplate for this test is from pin/pin_test.go, and I make no
claims that it's the best way to setup the test graph ;).
2015-05-08 21:43:43 -07:00
David Braun
f6c6d5de13 Add CORS middleware handler to the API. 2015-05-08 18:41:00 -07:00
W. Trevor King
10669e8b8c path/resolver: Fix recursive path resolution
I'm not entirely clear on Go's scoping (there's some text I can't
quite parse here [1]), but it seems like the := version (because this
is the first time we use 'err') was masking the function-level 'nd'
just for this if block.  That means that after we get out of the if
block and return to the start of the for-loop for the next pass,
nd.Links would still be pointing at the original object's links.

This commit drops the :=, which fixes the earlier:

  $ ipfs ls QmXX7YRpU7nNBKfw75VG7Y1c3GwpSAGHRev67XVPgZFv9R/static/css
  Error: no link named "css" under QmXX7YRpU7nNBKfw75VG7Y1c3GwpSAGHRev67XVPgZFv9R

so we get the intended:

  $ ipfs ls QmXX7YRpU7nNBKfw75VG7Y1c3GwpSAGHRev67XVPgZFv9R/static/css
  Qme4r3eA4h1revFBgCEv1HF1U7sLL4vvAyzRLWJhCFhwg2 7051 style.css

It also means we're probably missing (or are unreliably using) a
multi-level-path-resolving test.

[1]: https://golang.org/ref/spec#Declarations_and_scope
2015-05-08 16:25:39 -07:00
Juan Batiz-Benet
cd37b6741d Merge pull request #1189 from ipfs/refactor/coreResolve
core: add context.Context param to core.Resolve()
2015-05-08 01:33:52 -04:00
Juan Batiz-Benet
d529ccbc45 Merge pull request #1202 from ipfs/godeps/metrics
godeps: update metrics (freebsd build fix)
2015-05-08 01:29:05 -04:00
Juan Batiz-Benet
74a7a26c8b Merge pull request #1206 from insanity54/docs/1088
add link to community contributing #1088
2015-05-08 01:27:48 -04:00
Juan Batiz-Benet
887f6bbbf0 Merge pull request #1209 from ipfs/fixImportRewrite
godeps: rewrite import path
2015-05-08 01:26:55 -04:00
Henry
f640ba0089 core: add context.Context param to core.Resolve()
commands/object: remove objectData() and objectLinks() helpers
resolver: added context parameters
sharness: $HASH carried the \r from the http protocol with
sharness: write curl output to individual files
http gw: break PUT handler until PR#1191
2015-05-08 03:14:32 +02:00
Henry
bcd5673a79 godeps: rewrite import path 2015-05-08 01:10:20 +02:00
Chris Grimmett
10eecf06e0 add link to community contributing #1088 2015-05-07 14:33:55 +00:00
Juan Batiz-Benet
bf5b8032a8 Merge pull request #1205 from wking/retreive-typo
ipnsfs/system: Fix 'retreive' -> 'retrieve' typo
2015-05-07 01:37:40 -04:00
W. Trevor King
ed07c05887 ipnsfs/system: Fix 'retreive' -> 'retrieve' typo
From 93b06f34 (Add timeout to ipns resolution at startup, 2015-04-24,
#1133).
2015-05-06 22:29:23 -07:00
Henry
2ca2a042b9 godeps: update metrics (freebsd build fix) 2015-05-06 14:14:40 +02:00
Juan Batiz-Benet
0d521ff288 Merge pull request #1199 from ipfs/feat/bsrefactor
mild refactor of bitswap
2015-05-06 05:31:33 -04:00
Jeromy
9049dae674 address comments from CR 2015-05-06 01:35:59 -07:00
Jeromy Johnson
0324b4b283 mild refactor of bitswap 2015-05-06 01:35:57 -07:00
Juan Batiz-Benet
2d47c7f64e Merge pull request #1200 from ipfs/fix/blocksize-calc
correct the blocksize calculation for link blocks
2015-05-06 04:34:47 -04:00
Jeromy Johnson
95f01537a3 correct the blocksize calculation for link blocks
update hash for bigfile
2015-05-06 01:04:15 -07:00
Juan Batiz-Benet
54633317a1 Merge pull request #1198 from dominictarr/master
make comments match the code in secure channel implementation
2015-05-06 03:18:41 -04:00
Dominic Tarr
e89e83f49e make comments describe what code actually does. 2015-05-06 15:33:26 +12:00