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

feat: enable pubsub via settings menu #1735

Merged
merged 7 commits into from
Jan 20, 2021
Merged

feat: enable pubsub via settings menu #1735

merged 7 commits into from
Jan 20, 2021

Conversation

andrew
Copy link
Contributor

@andrew andrew commented Jan 19, 2021

Part of #1647

Screenshot 2021-01-19 at 13 48 38

Adds a menu preference option to enable pubsub which adds a flag to the ipfsd-ctl options for startup.

Question: should this prompt a restart, given that the setting won't take effect until ipfs has been been restarted?

Bug: I'm getting the enabled/disabled message logged twice when clicking on the menu item, not quite sure why :

$ npm start

> ipfs-desktop@0.13.2 start
> cross-env NODE_ENV=development electron .

2021-01-19T16:19:06.988Z info: [meta] logs can be found on /Users/andrewnesbitt/Library/Application Support/IPFS Desktop
2021-01-19T16:19:10.560Z info: [web ui] window ready
2021-01-19T16:19:10.560Z info: [tray] starting
2021-01-19T16:19:10.607Z info: [tray] started
2021-01-19T16:19:10.608Z info: [ipfsd] start daemon STARTED
2021-01-19T16:19:10.937Z info: [daemon] removing api file
2021-01-19T16:19:11.954Z info: [ipfsd] start daemon FINISHED 1.3460042808055879s
2021-01-19T16:19:11.957Z info: [launch on startup] unavailable during development
2021-01-19T16:19:11.972Z info: [pubsub] disabled
2021-01-19T16:19:11.975Z info: [ipfs on path] no action taken
2021-01-19T16:19:17.770Z info: [pubsub] enabled
2021-01-19T16:19:17.791Z info: [pubsub] enabled
2021-01-19T16:22:36.969Z info: [pubsub] disabled
2021-01-19T16:22:37.000Z info: [pubsub] disabled

@jessicaschilling
Copy link
Contributor

@lidel, can you please have a look as you're able?

Without this the setting won't be applied.

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
ipfsd.stop() did not wait for proper shutdown, which caused things to go
racy during situations where we restart node.
When unlucky, I ended up with two go-ipfs processses.

Bumping version to include fix from ipfs/js-ipfsd-ctl#554

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
already logged in ./src/utils/create-toggler.js,
so here we only log statud when app starts and that is all

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
@lidel lidel changed the title Allow enabling pubsub setting via tray preferences feat: enable pubsub via settings menu Jan 19, 2021
it is still an experiment in go-ipfs:
https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#ipfs-pubsub

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.

@andrew looks and works great! ❤️

@olizilla
Copy link
Member

What if we enabled pubsub by default 🙀 💞

@lidel
Copy link
Member

lidel commented Jan 20, 2021

@olizilla if we do it here, we also should enable it in Brave (:lion: → 🙀)
Meanwhile, on the pubsub track there are open issues, would you pull the lever? :trollface: 🚂 🚋🚋🚋

I'd rather wait for ipfs/kubo#5383 and ipfs/kubo#6621 😅

@andrew
Copy link
Contributor Author

andrew commented Jan 20, 2021

Wow, thanks for the updates @lidel, I was only expecting some pointers, not just for you to finish the pr!

Tested on macOS, working as expected, restarting correctly and such 🎉

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

lidel commented Jan 20, 2021

@andrew I would give pointers but then found the unrelated bug, and it escalated 😅
I simplified it a bit (run out of coffee yesterday), mind checking again?
(I want to ship this this or next week because of the bug we've fixed in this PR :))

@andrew
Copy link
Contributor Author

andrew commented Jan 20, 2021

Retested on macOS, still looking good 👍

@lidel lidel merged commit 6dbfa13 into ipfs:master Jan 20, 2021
andrew added a commit to andrew/ipfs-desktop that referenced this pull request Jan 20, 2021
andrew added a commit to andrew/ipfs-desktop that referenced this pull request Jan 20, 2021
lidel added a commit that referenced this pull request Jan 25, 2021
* feat: disable/enable gc via settings menu

Closes #1647
Very similar approach to #1735

* fix: ensure checkbox follows cli flag config

- setting default state to on for new and pre-existing config
- remove keysize (not needed since go-ipfs 0.7.0 uses ED25519 keys by
  default)

Co-authored-by: Marcin Rataj <lidel@lidel.org>
lidel added a commit that referenced this pull request Jan 25, 2021
* feat: enable ipns over pubsub via settings menu 

Part of #1647

Very similar approach to #1735

* refactor: move pubsub experiments to exp. section

making it easier to find if someone edits config by hand

Co-authored-by: Marcin Rataj <lidel@lidel.org>
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.

4 participants