gammazero
fcbe47bc4b
Review changes
2021-02-26 11:10:56 -08:00
gammazero
e22413ab92
go-ipfs fetches migrations using specific IPFS path
2021-02-17 19:12:09 -08:00
gammazero
515381da12
minor code improvememts
2021-02-12 14:13:36 -08:00
gammazero
9d1fdccdca
test with latest distribution
2021-02-01 16:48:49 -08:00
gammazero
0942e3be66
rebase and resolve conflicts
2021-01-29 14:03:29 -08:00
gammazero
e205b664a2
Fix error reading zip when archive not found
...
- Udate path to IPFS dist
- Improve test coverage
2021-01-29 13:10:44 -08:00
gammazero
afcda7c05b
Fix migraion name when fetching in reverse order
2021-01-29 13:10:44 -08:00
gammazero
048db7599a
When version file is missing, do not assume this indicates version 0 since that breaks tests that get the version to see if ipfs is initialized
2021-01-29 13:10:44 -08:00
gammazero
01df5bd211
Export IpfsDir() and CheckIpfsDir()
...
- IpfsDir gets the location of the ipfs directory, whether it exists or not
- CheckIpfsDir get the location and checks whether it exists.
2021-01-29 13:10:44 -08:00
gammazero
5a3e567321
Do not put migrations under their own root
...
Since the migrations are not displayed on the dirtributions, there is not need to organize them under their own root to reduce visual clutter. Having each migration follow the same path as all other distributions makes each easier to find in the absence of a link displayed on the distributions web page. It also avoids complicating the distribution deployment scripts and allows each migration distribution to be treated the same as any other distribution.
2021-01-29 13:10:44 -08:00
gammazero
e37d08f210
Migration downloads individual migration binaries
...
The code in this PR finds the necessary mirgations, downloads the latest version of them from the distribution site, unpacks the executables, and runs the migrations in order.
This code is also used to build the ipfs-update tool and the fs-repo-migrations tool. Note: the fs-repo-migrations tool is only used to run stand-alone migrations now and is not used by either go-ipfs or ipfs-update.
Additional utility is provided by this PR, that is not specific to migrations:
- Find local ipfs directory
- Get current repo version
- Check for ipfs daemon availability
- Get version information about any distribution on distribution site
- Fetch and unpack any binary executable over ipfs or http
2021-01-29 13:10:44 -08:00
Adin Schmahmann
884a5aebd7
update distpath to version with fs-repo-migrations v1.7.1
2021-01-28 23:22:48 -05:00
Adin Schmahmann
8ed9ffd3a6
Merge pull request #7862 from ipfs/dependabot/go_modules/github.com/stretchr/testify-1.7.0
...
chore(deps): bump github.com/stretchr/testify from 1.6.1 to 1.7.0
2021-01-28 19:07:00 -05:00
Adin Schmahmann
e5bf4e6c6b
Merge pull request #7861 from ipfs/dependabot/go_modules/github.com/gogo/protobuf-1.3.2
...
chore(deps): bump github.com/gogo/protobuf from 1.3.1 to 1.3.2
2021-01-28 18:59:33 -05:00
Petar Maymounkov
8794928c31
add remote pinning policy for mfs ( #7798 )
...
* remote pinning service MFS policy
* update go-ipfs-config
* hardening secret sanitization in `ipfs config` commands
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-01-28 18:58:44 -05:00
dependabot-preview[bot]
a2f960c12e
chore(deps): bump github.com/stretchr/testify from 1.6.1 to 1.7.0
...
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify ) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/stretchr/testify/releases )
- [Commits](https://github.com/stretchr/testify/compare/v1.6.1...v1.7.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-28 18:22:00 -05:00
Adin Schmahmann
ae00327c44
Merge pull request #7885 from ipfs/dependabot/go_modules/github.com/ipfs/go-graphsync-0.6.0
...
chore(deps): bump github.com/ipfs/go-graphsync from 0.5.2 to 0.6.0
2021-01-28 18:17:57 -05:00
dependabot-preview[bot]
eb894dca7b
chore(deps): bump github.com/gogo/protobuf from 1.3.1 to 1.3.2
...
Bumps [github.com/gogo/protobuf](https://github.com/gogo/protobuf ) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/gogo/protobuf/releases )
- [Commits](https://github.com/gogo/protobuf/compare/v1.3.1...v1.3.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-28 18:14:16 -05:00
dependabot-preview[bot]
50f066f05e
chore(deps): bump github.com/ipfs/go-graphsync from 0.5.2 to 0.6.0
...
Bumps [github.com/ipfs/go-graphsync](https://github.com/ipfs/go-graphsync ) from 0.5.2 to 0.6.0.
- [Release notes](https://github.com/ipfs/go-graphsync/releases )
- [Changelog](https://github.com/ipfs/go-graphsync/blob/master/CHANGELOG.md )
- [Commits](https://github.com/ipfs/go-graphsync/compare/v0.5.2...v0.6.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-28 15:33:05 -05:00
@RubenKelevra
dd295e4560
show the domain name with the error ( #7886 )
...
* show the domain name if DNSLink failed to resolve a domain because it wasn't a valid domain name
Original author: @AluisioASG
2021-01-28 15:22:36 -05:00
Andrew Gillis
6f6f04543b
Improve error message when running key command that locks repo ( #7821 )
...
* Improve error message when running key commands that must be run when the daemon is not already running
Fixes Issue #7814
`ipfs key export` now does a PreRun check like `ipfs key rotate` was to give a better error to the user then "someone else has the lock" in the event that the daemon is running while trying to execute these offline-only commands.
While unlikely the "someone else has the lock" error can still be shown if two processes try and grab the repo lock at the same time.
This PreRun function is also exported so it can be used by `ipfs init` where it was originally copied from.
* Added more `ipfs key` command tests
When daemon is running:
- Test that import works
- Test that export fails
- Test that rotate fails
2021-01-28 15:15:49 -05:00
Adin Schmahmann
3e7a105676
Merge pull request #7887 from ipfs/docs/clarify-repeated-options
...
docs: comma delimited options in pin remote --help
2021-01-28 13:31:24 -05:00
Marcin Rataj
3bca93787a
docs: comma delimited options in pin remote --help
...
This adds clarification suggested in
https://github.com/ipfs/go-ipfs/pull/7823#pullrequestreview-577889138
2021-01-28 17:23:46 +01:00
Adin Schmahmann
89ef0d1956
Merge pull request #7828 from ipfs/fix/normalize-service-endpoint
...
fix: normalize remote service endpoint
2021-01-28 11:17:40 -05:00
Adin Schmahmann
61f3a2f3a2
fix: restrict remote pinning service endpoint URIs to HTTP/HTTPS
2021-01-27 19:28:58 -05:00
Adin Schmahmann
e0d484431a
test: add sharness tests for remote pinning service endpoints that are not http(s) URIs
2021-01-27 19:28:58 -05:00
Marcin Rataj
fc4095cfb3
refactor: url → endpoint
...
https://github.com/ipfs/go-ipfs/pull/7828#discussion_r543520089
2021-01-27 19:28:58 -05:00
Marcin Rataj
7313a45bc7
fix: url.RawFragment does not work in go1.14
...
I don't think we need to worry about #hash, so just removed it
2021-01-27 19:28:58 -05:00
Marcin Rataj
6851ede8eb
refactor: normalization with path.Clean
2021-01-27 19:28:58 -05:00
Marcin Rataj
5f692a76de
fix: normalize remote service endpoint
...
Closes #7826
2021-01-27 19:28:54 -05:00
Adin Schmahmann
c23ea34652
Merge pull request #7823 from ipfs/docs/pin-remote-cli
...
docs: improved --help for pin remote commands
2021-01-27 19:24:25 -05:00
Marcin Rataj
0b6912e3b3
refactor: cleanup arg params
2021-01-27 23:55:09 +01:00
Marcin Rataj
1cb90d7109
docs: pin remote readability
...
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
2021-01-27 23:55:07 +01:00
Marcin Rataj
3b82dd8e55
docs: CLI docs for pin remote commands
...
This adds docs in form of longer description that is displayed
when --help is passes on the CLI.
While at it, unified some language to match fields in the config file
and other places + included some tips and best practices which should
improve onboarding experience.
2021-01-27 23:53:41 +01:00
Adin Schmahmann
b0ff6dbd41
Merge pull request #7859 from ipfs/dependabot/go_modules/github.com/libp2p/go-libp2p-pubsub-0.4.1
...
chore(deps): bump github.com/libp2p/go-libp2p-pubsub from 0.4.0 to 0.4.1
2021-01-27 15:49:54 -05:00
Adin Schmahmann
8f3ae679ba
Merge pull request #7884 from ipfs/chore/update-pinner-dep
...
chore: update go-ipfs-pinner dep
2021-01-27 15:49:10 -05:00
gammazero
d2442956a4
Update deps to latest pinner
2021-01-27 11:57:01 -08:00
dependabot-preview[bot]
1e260f2f9d
chore(deps): bump github.com/libp2p/go-libp2p-pubsub from 0.4.0 to 0.4.1
...
Bumps [github.com/libp2p/go-libp2p-pubsub](https://github.com/libp2p/go-libp2p-pubsub ) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/libp2p/go-libp2p-pubsub/releases )
- [Commits](https://github.com/libp2p/go-libp2p-pubsub/compare/v0.4.0...v0.4.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-27 14:51:25 -05:00
Adin Schmahmann
b9b15feebf
Merge pull request #7822 from ipfs/dependabot/go_modules/github.com/ipfs/go-graphsync-0.5.2
...
chore(deps): bump github.com/ipfs/go-graphsync from 0.5.1 to 0.5.2
2021-01-27 12:43:22 -05:00
Adin Schmahmann
98eb7328cc
Merge pull request #7863 from ipfs/feat/stringsOptionDelim
...
pin remote commands are comma delimited on the CLI only
2021-01-27 12:42:13 -05:00
Adin Schmahmann
a95a86ed54
feat: ipfs pin remote ls commands are comma delimited on the CLI only
2021-01-27 12:07:44 -05:00
Adin Schmahmann
7588a6a52a
Merge pull request #7829 from ipfs/fix/pin-remote-service-ls-json
...
fix: remote services ls always return a list
2021-01-14 17:37:40 -05:00
Adin Schmahmann
651e3ccafd
Merge pull request #7807 from ipfs/fix/broken-cidv0-ux
...
fix: improved error message on broken CIDv0
2021-01-14 15:31:39 -05:00
Adin Schmahmann
b5079b03cd
Merge pull request #7802 from dennis-tra/issue-7686
...
feat(gw): URI router for Web API navigator.registerProtocolHandler
2021-01-14 15:25:22 -05:00
Marcin Rataj
216b858f8a
test: JSON response on empty remote service ls
2021-01-14 21:07:23 +01:00
Marcin Rataj
a0f90d3a14
test: cover 2 remaining lines
2021-01-14 20:53:20 +01:00
Marcin Rataj
cdad39479c
test: sharness for ?uri= router
...
Additional tests to ensure there are no regressions, as this will be
used by browser vendors in the future.
2021-01-14 20:53:17 +01:00
Marcin Rataj
abb25a1cfc
refactor: remove redundant urlescape
...
URL.Query() will already decode the query parameters
2021-01-14 20:52:04 +01:00
Marcin Rataj
3de5b14e0c
fix: ?uri= url-decode and preserve query
...
This makes ?uri= param able to process URIs passed by web browsers
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler
2021-01-14 20:52:04 +01:00
Dennis Trautwein
36368ee4dd
feat: support requests from registerProtocolHandler
...
This commit adds support for requests produced by navigator.registerProtocolHandler on gateways. Now one can register `dweb.link` as an URI handler for `ipfs://`:
```
navigator.registerProtocolHandler('ipfs', 'https://dweb.link/ipfs/?uri=%s ', 'ipfs resolver')
```
Then opening `ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR` will produce an HTTP GET call to:
```
https://dweb.link/ipfs?uri=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
```
The query parameter `uri` will now be parsed and the given content identifier resolved via:
`https://dweb.link/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR `
2021-01-14 20:52:04 +01:00