-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gateway: fix --writable flag :| #3206
Conversation
5c38677
to
bb44538
Compare
Added a test for |
We can defer this to 0.4.4 since the workaround is to simply set Writable=true in the config. I imagine |
test_kill_ipfs_daemon | ||
|
||
test_launch_ipfs_daemon --writable=false | ||
test_expect_success "ipfs daemon --writable=false overrides Writable=true config" ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we set the config value to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks! Moved the call to test_config_ipfs_gateway_writable
up a bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not seeing it... Does it happen in one of the test libs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey I think you might have been viewing the outdated diff -- it happens right there: https://github.com/ipfs/go-ipfs/pull/3206/files#r78514885
(and I filed #3208 for the unrelated test failure)
4f06f49
to
11121b4
Compare
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
11121b4
to
fc8e6de
Compare
Okay we're finally green, I filed #3208 for an unrelated failure. |
if writableOptionFound { | ||
cfg.Gateway.Writable = writable | ||
if !writableOptionFound { | ||
writable = cfg.Gateway.Writable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 4 lines are the essence of the bug.
LGTM! |
gateway: fix --writable flag :| This commit was moved from ipfs/kubo@0aa136a
Broke it in #2874... my unproven assumption apparantly was that
cfg.Gateway.Writable = true
would somehow magically make it into other instances of the config retrieved viaRepo.Config()
...We're not overloading the repo config with this anymore now. We also have a test for
--writable
now.