Also added types and marshalers to the swarmFiltersAddCmd and
swarmFiltersRmCmd structs.
License: MIT
Signed-off-by: Yuval Langer <yuval.langer@gmail.com>
This patch is in preparation for the gateway's extraction.
It's interesting to trace technical debt back to its
origin, understanding the circumstances in which it
was introduced and built up, and then cutting it back
at exactly the right places.
- Clean up the gateway's surface
The option builder GatewayOption() now takes only
arguments which are relevant for HTTP handler muxing,
i.e. the paths where the gateway should be mounted.
All other configuration happens through the
GatewayConfig object.
- Remove BlockList
I know why this was introduced in the first place,
but it never ended up fulfilling that purpose.
Somehow it was only ever used by the API server,
not the gateway, which really doesn't make sense.
It was also never wired up with CLI nor fs-repo.
Eventually @krl started punching holes into it
to make the Web UI accessible.
- Remove --unrestricted-api
This was holes being punched into BlockList too,
for accessing /ipfs and /ipn on the API server.
With BlockList removed and /ipfs and /ipns freely
accessible, putting this option out of action
is safe. With the next major release,
the option can be removed for good.
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
This reverts commit ff75bc0318579fa743a35d316c61d2f8c4ab92ce,
which broke building on windows. See ipfs/go-ipfs#2833.
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
Why is it failing:
process is started, cancel() is called,
between we satart listening to the channels
in select statemnet there is race of three things
that can happent:
1. Task can complete
2. Task can start closing <- expected
3. Task already closed
This race causes failures of the test.
It is basing heavily on race of conditions where
the task not closing, nor the task is completed
before channels are being listened.
It is quite impossible to resolve without
adding bunch of timings in there, which we
want to avoid, as there is no atomic
"send message on channel and select" in Golang
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
According to golang standards, these should not be capitalized nor having a trailing period, AFAIK.
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Due to SO_REUSE_PORT it is possible for a localhost:0
address to repeat. This causes failure in DHT tests
where we spun up a lot of nodes inside test.
As for a birthday paradox it is enough to use 140
ports to get 20% chance for collision which was causing
failure in our case.
The fix is to disable REUSE_PORT routine for the
tests and leave it running for sharness tests where
not that many addresses are used at the same time.
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>