Skip to content
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

fix: uppercase Discovery.MDNS.enabled in default config #1632

Merged
merged 3 commits into from
Sep 14, 2020

Conversation

rafaelramalho19
Copy link
Contributor

Fixes #1631

@olizilla
Copy link
Member

olizilla commented Sep 9, 2020

@lidel do you think we should have ipfs desktop check for the incorrect key in the config, and remove it where it finds it?

This cleans up configs of existing users
As suggested in
#1632 (comment)

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
@lidel
Copy link
Member

lidel commented Sep 10, 2020

Good question. Right now we only control the defaults applied on clean install.

There is a need to have some generic way of migrating go-ipfs configs of existing users for things like ConnMgr limits, so to make this and future changes easier, I've added migrateConfig function () which checks revision and applies one-time migration, if needed.

@rafaelramalho19 @olizilla mind reviewing my changes?

@lidel lidel requested a review from olizilla September 10, 2020 19:33
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but because I've added migrateConfig would appreciate second set of eyes before merge


// Cleanup https://github.com/ipfs-shipyard/ipfs-desktop/issues/1631
if (config.Discovery && config.Discovery.MDNS && config.Discovery.MDNS.enabled) {
config.Discovery.MDNS.Enabled = config.Discovery.MDNS.Enabled || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this true everytime?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, user could remove it or explicitly set it to false to disable noise in LAN

@lidel
Copy link
Member

lidel commented Sep 14, 2020

Merging to unblock #1638

@lidel lidel merged commit 97f9293 into master Sep 14, 2020
@lidel lidel deleted the fix/mdns-enabled-bug branch September 14, 2020 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typo in IPFS config property Discovery.MDNS.Enabled
4 participants