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

[next] Add zowe config import #1083

Closed
MikeBauerCA opened this issue Jul 28, 2021 · 6 comments
Closed

[next] Add zowe config import #1083

MikeBauerCA opened this issue Jul 28, 2021 · 6 comments
Assignees
Labels
team-profile Issues and PRs related with the team config initiative
Milestone

Comments

@MikeBauerCA
Copy link
Contributor

Similar to #1072 but for the initial onboarding process for global config. Having a command like zowe config import ~/Downloads/zowe.config.json to copy the zowe.config.json to the global location ~/.zowe/zowe.config.json could improve the onboarding experience. Today, users either need to copy this file from the command line or unhide the .zowe folder in their file explorer.

@MikeBauerCA MikeBauerCA added the team-profile Issues and PRs related with the team config initiative label Jul 28, 2021
@t1m0thyj
Copy link
Member

Related to this, the initial implementation of zowe config init by @tucker01 supported a --url flag to import a config file from a URL. Perhaps the zowe config import command could support remote Internet URLs in addition to local file paths?

@MikeBauerCA
Copy link
Contributor Author

@t1m0thyj @tucker01 nice - I like that addition 🥇

@t1m0thyj
Copy link
Member

@MikeBauerCA A few questions about how you think this should be implemented? 🙂

  • In the case that ~/.zowe/zowe.config.json already exists, should the default behavior be overwrite it or merge with its contents? And should there be an --overwrite flag to change this behavior?
  • Should "zowe.schema.json" also be copied/downloaded, if the "zowe.config.json" file being imported references one?
  • Should we prompt for credentials like zowe config init does, if there are secure properties in the config being imported?

@MikeBauerCA
Copy link
Contributor Author

@t1m0thyj

In the case that ~/.zowe/zowe.config.json already exists, should the default behavior be overwrite it or merge with its contents? And should there be an --overwrite flag to change this behavior?

I'm not sure on merging. If that is an option we can expose for low effort (e.g. --merge) that may be useful. However, I was thinking that if it was present, prompt them to ensure they would like to overwrite (we can also accept a --overwrite | --ow flag.

Should "zowe.schema.json" also be copied/downloaded, if the "zowe.config.json" file being imported references one?

Yes, good suggestion 👍

Should we prompt for credentials like zowe config init does, if there are secure properties in the config being imported?

No, I think the import operation should be separate from the init operation. Perhaps in the near future, users will just import config and start running commands without a separate init operation.

@MikeBauerCA MikeBauerCA added this to the Backlog milestone Aug 26, 2021
@t1m0thyj
Copy link
Member

t1m0thyj commented Sep 3, 2021

Another question raised by @awharn: If we are importing from another config on disk, should we check the secure credential vault for secure values in that config, and if there are values, should the secure values be copied to the new config as part of the import command?

@MikeBauerCA
Copy link
Contributor Author

The primary target use case for this particular issue was for initial onboarding so there would not be any secure values present. However, this proposed enhancement to copy the secure values would be excellent for the use case of importing project config to global config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-profile Issues and PRs related with the team config initiative
Projects
None yet
Development

No branches or pull requests

3 participants