Commit Graph

1087 Commits

Author SHA1 Message Date
Kishan Sagathiya
a741eb42ab Issue #453 Extract the IPFS Proxy from ipfshttp
We want to maintain configuration compatibility and still recognize the
proxy configuration options in the ipfshttp connector configuration
section.

Check if there is a proxy configuration section.
If not create one with the options from the ipfshttp section (if they
are defined, otherwise do nothing).

This implementation utilizes the fact that json object can be
unmarshelled to a struct whose elements are a subset of the json object

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-11-03 16:15:34 +05:30
Kishan Sagathiya
3a5ad6111a Issue #453 Extract the IPFS Proxy from ipfshttp
Changes as requieed
Rename IPFSProxy struct to Server

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-11-01 15:54:05 +05:30
Kishan Sagathiya
fdb573c96f Issue #453 Extract the IPFS Proxy from ipfshttp
Adding more missing pieces in config
Use the right package(not the inbuilt one)
Setup rpc client for proxy in the cluster
Add back SetClient and Shutdown into Connector as they are required to
implement Component interface
Add `ipfsproxy` as into list of logging identifier and add its default
log level

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-14 22:42:50 +05:30
Kishan Sagathiya
2e66720486 Issue #453 Extract the IPFS Proxy from ipfshttp
Go through `ipfshttp` repo and remove unnecessary proxy related code

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-14 18:28:15 +05:30
Kishan Sagathiya
6803df4e97 Issue #453 Extract the IPFS Proxy from ipfshttp
Go through `ipfsproxy` repo and change things that are inappropriate

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-14 18:00:19 +05:30
Kishan Sagathiya
d338f8de53 Issue #453 Extract the IPFS Proxy from ipfshttp
Added config
Change functions accordingly to add new `ipfsproxy` component

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-14 16:07:42 +05:30
Kishan Sagathiya
155a65cac3 Issue #453 Extract the IPFS Proxy from ipfshttp
Extract the IPFS Proxy from ipfshttp and make it an api module

The `ipfshttp` IPFSConnector implementation includes the so called IPFS
Proxy. An endpoint which offers an IPFS API, hijacking some interesting
requests and forwarding the rest to the ipfs daemon.

`ipfshttp` should contain an implementation of IPFSConnector whose only
task should be to talk to IPFS
A new module should be created, `api/ipfsproxy`, an API Component
implementation for Cluster. The whole proxy code should be moved here.

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-13 19:58:28 +05:30
Hector Sanjuan
f65349e9c8
Merge pull request #569 from ipfs/fix/add-output-format
Add endpoints output: improvements and compliance
2018-10-05 11:44:59 +02:00
Hector Sanjuan
4b294adc68
Merge pull request #570 from ipfs/feat/use-stdlib-reverse-proxy
ipfshttp: remove custom proxy and use stdlib reverse proxy
2018-10-04 11:47:44 +02:00
Adrian Lanzafame
c0dbce61a8
ipfshttp: remove custom proxy and use stdlib reverse proxy
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2018-10-04 15:03:27 +10:00
Hector Sanjuan
b6306a6e61 Add endpoints output: improvements and compliance
This straigthens some mistakes with the outputs of the /add endpoints.

Currently, we had exactly the same output format which:

* was not exactly the ipfs API output format but was sort of similar
* made some weird concessions to be compatible (like having a string-type "size")
* was not aligned with Cluster API conventions (lowercase keys)

This corrects all this:

* The Cluster API /add output format now uses the right types and lowercase keys.
* `Hash` is now `Cid`, because the field carries a Cid.
* We copy error handling with request trailers from IPFS, and avoid carrying the
  errors in the output objects.
* The proxy now returns exactly the types as ipfs would
* We add the X-Chunked-Output: 1 header, which is custom and redundant, but
otherwise breaks js-ipfs-api integrations with the /add endpoint.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-04 00:57:36 +02:00
Hector Sanjuan
3e11445516
gx publish 0.6.0
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-03 15:21:55 +02:00
Hector Sanjuan
d327155c65
Release 0.6.0
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-03 15:21:30 +02:00
Hector Sanjuan
31e0e50c71
Merge pull request #568 from ipfs/0.6.0/changelog
Changelog for 0.6.0
2018-10-03 12:26:50 +02:00
Hector Sanjuan
5128d15a33
Merge pull request #567 from ipfs/fix/godoc-wait-for
Docs: Fix comment for WaitFor function
2018-10-03 11:39:23 +02:00
Hector Sanjuan
dc0b211324 Docs: Fix comment for WaitFor function
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-03 11:04:24 +02:00
Hector Sanjuan
b558b50608 Changelog for 0.6.0
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-03 10:57:56 +02:00
Hector Sanjuan
d0bb79dbd5
Merge pull request #564 from ipfs/fix/client-ipfs
Fix IPFS() method missing in Client interface
2018-10-02 12:10:07 +02:00
Hector Sanjuan
89aaabd770
Merge pull request #565 from ipfs/fix/snaps-again2
Fix: snaps for tags
2018-10-02 12:09:27 +02:00
Hector Sanjuan
52397f0155 Fix: snaps for tags
It seems branch = master prevents building snaps for tags (?)

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 20:17:24 +02:00
Hector Sanjuan
b5631aeb8a Fix IPFS() method missing in Client interface
Seems we forgot about this one.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 20:09:26 +02:00
Hector Sanjuan
12e7695b1e
gx publish 0.6.0-rc1
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 16:35:35 +02:00
Hector Sanjuan
2e0f008dff
Release 0.6.0-rc1
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 16:34:58 +02:00
Hector Sanjuan
9907103508 Fix release script with new cmd/ folder
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 16:34:22 +02:00
Hector Sanjuan
29e582018a
Merge pull request #563 from ipfs/fix/552-stateless-test
Fix #552: test failing on travis on windows
2018-10-01 16:23:49 +02:00
Hector Sanjuan
d0f735b167
Merge pull request #562 from ipfs/fix/snaps-again
Snap build fixes. Re-enable multiarch builds.
2018-10-01 15:47:44 +02:00
Hector Sanjuan
ca50393100 Snap build fixes. Re-enable multiarch builds.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 15:46:30 +02:00
Hector Sanjuan
fc5a6df3ad Fix #552: Pintracker tests were pinning in parallel
When we increased the default concurrency setting
we forgot the tests are for ConcurrentPins=1.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 15:27:50 +02:00
Hector Sanjuan
5cdff2abc3
Merge pull request #561 from ipfs/fix/client-cid-pointer
api/rest: change *cid.Cid to cid.Cid in client iface
2018-10-01 13:31:52 +02:00
Hector Sanjuan
ea4e3704b4
Merge pull request #558 from ipfs/fix/go-1.11
Update to go-1.11
2018-10-01 13:07:11 +02:00
Hector Sanjuan
e86fefb808 ctl: Make remaining changes from *cid.Cid to cid.Cid in ipfs-cluster-ctl
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 12:53:42 +02:00
Adrian Lanzafame
000f2b3f6e api/rest: change *cid.Cid to cid.Cid in client iface
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2018-10-01 12:51:57 +02:00
Hector Sanjuan
0ee7ecf28e
Merge pull request #560 from ipfs/fix/548-keepalives
Fix #548: Re-enable keep-alives. Set Connection: Close when adding.
2018-10-01 12:11:35 +02:00
Hector Sanjuan
b27ae72ef0 Update to go-1.11
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 12:03:08 +02:00
Hector Sanjuan
2d310455be
Merge pull request #559 from ipfs/fix/554-snap-deploy
Fix #544: Push Snaps to the right channel depending on tags
2018-10-01 12:01:01 +02:00
Hector Sanjuan
6e83ef5f24 Fix #548: Re-enable keep-alives. Set Connection: Close when adding.
This is a workaround to have clients behave properly with the /add
endpoint by asking them to close connections when done, effectively
disabling keep-alive for this.

This means we don't need to disable keep-alives fully on all servers,
since the rest of endpoints are not affected (they are not streaming
endpoints).

Reference https://github.com/ipfs/go-ipfs/issues/5168

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-09-29 02:07:57 +02:00
Hector Sanjuan
c8c003a208 Fix #544: Push Snaps to the right channel depending on tags
Also, make sure they are only built on master builds of the original
repo.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-09-28 21:44:05 +02:00
Hector Sanjuan
ef31db6548
Merge pull request #523 from jglukasik/master
First pass at creating a client interface ClientIface
2018-09-28 21:07:16 +02:00
Hector Sanjuan
61aa83fcc2
Merge pull request #555 from ipfs/fix/make-test
fix make test: the make test rule should not pass the -loglevel flag
2018-09-28 19:51:45 +02:00
Joseph Lukasik
b98e549d92 Add Client interface, implemented by defaultClient
License: MIT
Signed-off-by: Joseph Lukasik <joseph@jgl.me>
2018-09-27 16:51:34 -07:00
Hector Sanjuan
9ed41bbd21
Merge pull request #556 from ipfs/issue_485
Move `ipfs-cluster-service` and `ipfs-cluster-ctl` to `cmd/`
2018-09-27 21:53:39 +02:00
Kishan Sagathiya
79481f83dc Move ipfs-cluster-service and ipfs-cluster-ctl to cmd/
This commit moves `ipfs-cluster-service` and `ipfs-cluster-ctl` to
`cmd/` directory to follow "standard" project structure.

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-09-27 20:56:09 +02:00
Hector Sanjuan
b78f9881c1 fix make test: the make test rule should not pass the -loglevel flag
It's not supported in all subpackages. Make test is not really used
in our CI that's why we didn't see this before.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-09-27 20:27:51 +02:00
Hector Sanjuan
398cdaa957
Merge pull request #549 from ipfs/fix/543-add-unhealthy
Fix #543: Use only healthy peers when adding everywhere (+tests)
2018-09-27 16:52:12 +02:00
Hector Sanjuan
cbdd075bb2
Merge pull request #551 from ipfs/fix/minor-version-compat
Allow running peers with different cluster versions in the same cluster
2018-09-27 08:13:53 +02:00
Hector Sanjuan
e7b1eacf83 Fix #543: Use only healthy peers when adding everywhere (+tests)
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-09-27 08:12:29 +02:00
Hector Sanjuan
2279856dfb
Merge pull request #550 from ipfs/fix/520-snapcraft-stages
Fix #520 snapcraft stages
2018-09-27 08:11:44 +02:00
Hector Sanjuan
59714f69d4 Allow running peers with different cluster versions in the same cluster
This patch modifies the RPC protocol tag to use Major and Minor parts of the
version and not all of it.

This means all peers on the 0.5.x can run in the same cluster.

As cluster has become more mature and I see less risks in letting peers from
similar versions run together. This is useful when upgrading too.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-09-27 07:35:57 +02:00
Hector Sanjuan
997fb939f8 Fix #520: Re-work travis CI file.
- Only push snapcraft file once
- Give names to stages

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-09-26 16:54:17 +02:00
Hector Sanjuan
e941d6b4bc
Merge pull request #531 from kishansagathiya/issue_446
Issue #446 Adding peername to PinInfo
2018-09-26 13:26:46 +02:00