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

new flag --confpath on generate config #1683

Conversation

mrpalide
Copy link
Contributor

@mrpalide mrpalide commented Dec 7, 2023

Did you run make format && make check? Yes

Fixes #_

Changes:

  • add --confpath flag as path of offline file of https://conf.skywire.skycoin.com service that could read from file instead server for times that conf service not available.

How to test this PR:

  • build binaries
  • save https://conf.skywire.skycoin.com data into file like conf.json
  • trying to create config by skywire-cli config gen --confpath path/to/conf.json command

@0pcom
Copy link
Collaborator

0pcom commented Dec 7, 2023

could the same --conf or -a flag be used, and simply check if the string provided is a local file or a url? And perhaps change the help text to say specify service conf url or file?

@mrpalide
Copy link
Contributor Author

mrpalide commented Dec 7, 2023

simply check if the string provided is a local file or a url?

It's just about offline file of config bootstrapper service. May I add custom-url too @0pcom ?

@0pcom
Copy link
Collaborator

0pcom commented Dec 7, 2023

simply check if the string provided is a local file or a url?

It's just about offline file of config bootstrapper service. May I add custom-url too @0pcom ?

we already have it as config gen -a

the long flag might be --url but you can change that to --conf or something like that

@mrpalide
Copy link
Contributor Author

mrpalide commented Dec 8, 2023

Unfortunately, no straightforward method for validate URL. Check here https://stackoverflow.com/a/55328193.
So we keep separate flags for URL and file of service conf.

@0pcom 0pcom merged commit df32a9a into skycoin:develop Dec 10, 2023
3 checks passed
@mrpalide mrpalide changed the title new flag --config-service on generate config new flag --confpath on generate config Dec 10, 2023
@mrpalide mrpalide deleted the feat/parse-confService-content-as-file-to-generate-config-command branch March 26, 2024 13:51
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