Commit Graph

1262 Commits

Author SHA1 Message Date
Kishan Sagathiya
fafbf7b929 Issue #449 API endpoint for Peer Monitor metrics
Opened new endpoint `GET /health/metrics/<name>` which would respond
with metrics of type <name>

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-21 12:49:56 +05:30
Hector Sanjuan
4e3553fb1f Fix: escape the add query parameters correctly in the client
When adding something that has a name with spaces, things fail
very badly.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-19 20:19:52 +02:00
Kishan Sagathiya
c370e86cca Issue #532 -f init should clean up state
Cosmetic changes

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-18 19:06:07 +05:30
Kishan Sagathiya
687f49d1b7 Issue #532 -f init should clean up state
Cosmetic changes

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-18 19:06:07 +05:30
Kishan Sagathiya
5f52cc60a8 Issue #532 -f init should clean up state
Change to more appropriate prompt message

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-18 19:06:07 +05:30
Kishan Sagathiya
f77bb9dbcc Issue #532 -f init should clean up state
Fix sharness tests by using commands with local flags

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-18 19:06:07 +05:30
Kishan Sagathiya
7fd42cff44 Issue #532 -f init should clean up state
Remove force from global flags and use it as a local flag

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-18 19:06:07 +05:30
Kishan Sagathiya
dbc5f97d5e Issue #532 -f init should clean up state
Prompt on init and skip the prompt in init -f (and not have a -y flag)
This would be in line with other state subcommands which ask by default
and -f skips the prompt.

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-18 19:06:07 +05:30
Kishan Sagathiya
d599ef891b Issue #532 -f init should clean up state
Prompt before cleaning up the state

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-18 19:06:07 +05:30
Kishan Sagathiya
d80532d032 Issue #532 -f init should clean up state
Do cleanup after configuration in service.json is created

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-18 19:06:07 +05:30
Kishan Sagathiya
96944d0ffb Issue #532 -f init should clean up state
ipfs-cluster-service -f init` should clean up state

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2018-10-18 19:06:07 +05:30
Hector Sanjuan
96af118144 Fix #577: Try downloading gx and gx-go from local ipfs gateway first
This modifies the Makefile so that gx and gx-go downloads are first
attempted from the local ipfs gateway (127.0.0.1:8080) and then
from the offical gateway (ipfs.io).

Make and wget doesn't work well dealing with stuff in subfolders,
so I have moved deptools-related rules to the deptools folder in its own
Makefile.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-18 14:09:19 +02:00
Hector Sanjuan
b0b826de39
Merge pull request #580 from ipfs/libp2p-6.0.19
Upgrade to libp2p-6.0.19. Update deps.
2018-10-18 12:07:46 +02:00
Hector Sanjuan
3c9945f8a3
Merge pull request #573 from ipfs/feat/gossipsub
Pubsubmon: Gossipsub
2018-10-18 12:07:19 +02:00
Hector Sanjuan
f669d759d9
Merge pull request #578 from ipfs/feat/api-headers
Restapi: Add configurable response headers
2018-10-18 11:19:55 +02:00
Hector Sanjuan
72e19b4fa1 Use better version for gorpc
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 15:33:44 +02:00
Hector Sanjuan
7d16108751 Start using libp2p/go-libp2p-gorpc
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 15:28:03 +02:00
Hector Sanjuan
7544306ae3 Fix golint in travis
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 14:25:22 +02:00
Hector Sanjuan
80baf7d00a Fix changed peer ID String() output.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 14:08:56 +02:00
Hector Sanjuan
86b74c059a Fix using new libp2p-http
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 13:47:23 +02:00
Hector Sanjuan
562ad713fc Update docs for sendResponse
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 13:43:57 +02:00
Hector Sanjuan
58d35f34ee Upgrade to libp2p-6.0.19. Update deps.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 13:40:40 +02:00
Hector Sanjuan
322e87dd59 Restapi: Add configurable response headers
By default, CORS headers allowing GET requests from everywhere are
set. This should facilitate the IPFS Web UI integration with the
Cluster API.

This commit refactors the sendResponse methods in the API, merging
them into one as it was difficult to follow the flows that actually
send something to the client. All tests now check the presence of
the configured headers too, to make sure no route was missed.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 11:42:25 +02:00
Hector Sanjuan
d29e9933f6
Merge pull request #579 from brianmcmichael/patch-1
Allow ipfs-cluster-ctl to access files
2018-10-17 00:43:15 +02:00
Brian L. McMichael
a1132b7b74 Allow ipfs-cluster-ctl to access files
In the snap-installed distribution, calls like `ipfs-cluster-ctl add myfile.txt` fail with error `Error: open myfile.txt: permission denied` due to strict confinement to files in the /snap folder. Modifying confinement to `classic` will allow access to files elsewhere on the system.

License: MIT
Signed-off-by: brianmcmichael <brian@brianmcmichael.com>
2018-10-16 17:43:47 -04:00
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
fcbfc7f46a Pubsubmon: fix test by reducing gossipsub heartbeat
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-11 11:27:42 +02:00
Hector Sanjuan
7f60cb318c Pubsubmon: Gossipsub
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-10 16:00:37 +02:00
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