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

Selected DMSG Server #1422

Merged
merged 2 commits into from
Dec 10, 2022
Merged

Selected DMSG Server #1422

merged 2 commits into from
Dec 10, 2022

Conversation

mrpalide
Copy link
Contributor

@mrpalide mrpalide commented Dec 10, 2022

Did you run make format && make check? Yes

Fixes #1387

Changes:

  • new flag for skywire-visor as --dmsg-server <pk> for set specific dmsg server during running visor.
  • pass this flag to visor.New() and set in context in initDmsg for dmsg.Server() part

How to test this PR:

  • checkout dmsg to Selected DMSG Server dmsg#199
  • on go.mod comment out replace part for dmsg
  • run make dep then make build
  • from dmsg discovery all lists (prod or test, based on your visor config) choosing one dmsg server public key
  • run visor by that key as --dmsg-server flag like ./skywire-visor -c skywire-config.json --dmsg-server 02113579604c79b704e169a4fd94fd78167b86fe40da1016f8146935babcc9abcb
  • check logs of visor

- set dmsgServer as key-value in ctx if selected dmsg-server by user to visor on startup ./skywire-visor --dmsg-server <pk> -c skywire-config.json. This ctx will use in dmsg.Serve
@0pcom
Copy link
Collaborator

0pcom commented Dec 10, 2022

This is ok for our immediate purposes, but I would not expect such a setting to survive a config reload.

Even in the context of config gen / update, we don't have a way to really persist this setting either but we could use a flag for it. So please do come back with another PR which adds a flag for config gen, and for config update if you want.

What we really need is this

  • a locally running conf service endpoint
  • support via scripts or envs in the packaging for switching to use that by default
  • set a different dmsg discovery in your local conf service endpoint and pull the rest from conf.skywire.skycoin.com
  • your local dmsg discovery always shows the dmsg server you set first

this fits into the larger context of both user deployments of dmsg and robustly persisting settings across updates.

I won't complicate our testing efforts in the immediate term with this, but it is something for us to work toward

@0pcom 0pcom merged commit c277be2 into skycoin:develop Dec 10, 2022
@mrpalide mrpalide deleted the feat/specific-dmsg-server-as-input branch January 8, 2023 16:36
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.

2 participants