feat: add $IPFS_PATH/gateway file#9156
Conversation
The file contains the gateway your node is hosting in the http://<host>:<port> format. Structurally it works exactly the same as the API file.
|
cc @lidel, @Stebalien, @SgtPooki, @aschmahmann and @TheDiscordian Note that @lidel offered to review this meaning it's just a "fyi" for the others. I'd like to get this in the next kubo (0.15.0) as ffmpeg already relies on this and curl is probably soon going to follow suit. |
Our new release policy is a linux like one, where whatever is ready (merged into master and not absolutely crashing everything) is released, anything else is just bumped down. We do that every 5 weeks (including a week of freeze / RC). The freeze start is |
|
Guess we have 2 1/2 week to get it "mergeable" then @Jorropo ;) I have no clue why some tests fail btw.. Any hint there? |
|
I've restarted the tests because the errors was weird, I do think it's related to your PR, we don't have THAT many flaky tests. |
|
@markg85 the linter is complaining, please run |
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
There was a problem hiding this comment.
Needs green CI and a sharness test that confirms the file is created and includes URL matching the value in Addresses.Gateway.
|
Green, yay :) |
|
Hi all, I added a testcase in the file that already has a slew of gateway tests in there. Seemed like the logical place (either that or the daemon test file). Is there anything else I need to do for this patch? |
Jorropo
left a comment
There was a problem hiding this comment.
LGTM, thx for your patch 🎉
| } | ||
|
|
||
| if len(listeners) > 0 { | ||
| if err := node.Repo.SetGatewayAddr(listeners[0].Addr()); err != nil { |
There was a problem hiding this comment.
It seems quite arbitrary to pick the index 0, I would maybe add a filter to pick localhost if possible but I don't think it's worth fixing.
The file contains the gateway your node is hosting in the http://: format.
Structurally it works exactly the same as the API file.
IPIP: ipfs/specs#280