-
Notifications
You must be signed in to change notification settings - Fork 22
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
Ask pull secret during start #21
Conversation
Signed-off-by: Yevhen Vydolob <[email protected]>
Signed-off-by: Yevhen Vydolob <[email protected]>
9b6b737
to
d569e23
Compare
This PR says it must be valid JSON but neither the input prompt or error message do, so the user could be pasting something else thinking it's the pull secret (or e.g. have an extra character on it) and not understanding what's wrong. Could we change the input message, or error to something like "Pull secret is not valid JSON"? If I paste some random JSON, do I get the same error message? It would be good if the error was different in that case or the error told me something about the format (e.g. main key) so that it's obvious what JSON snippet I'm looking for. nit: "to start" is redundant in the error message, I'd remove it and just have "please try again". |
Signed-off-by: Yevhen Vydolob <[email protected]>
d569e23
to
a7169f6
Compare
@deboer-tim I add pullsecret validation(copy from crc codebase), and show more descriptive error: |
@evidolob Not sure if we should mention "Escape" to cancel... but I am sure people will; As I believe the information how to get the pull-secret is more important. The issue is that the current UI and API can't cater to this. The UI I and Mairin came up with shows the pull-secret dialog as the tray-electron did. People will be in a situation they might not have the right answer to. I think we have to make a follow-up issue to make sure we revise this when possible. |
The ideal is that the pull-secret is automagically retrieved and does not see a copy-paste action. And instead, you will just provide the RH credentials, and see the pull-secret identity in a form as:
|
@gbraad |
Weird text. As an example, vscode does not state this. |
Signed-off-by: Yevhen Vydolob <[email protected]>
Signed-off-by: Yevhen Vydolob <[email protected]>
return got.get(url, { | ||
enableUnixSockets: true, | ||
throwHttpErrors: false, | ||
retry: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
OK, since this is a prompt and not a selection. I am fine with this as the ideal is that this prompt is not shown at all. |
Fixes #18
This PR add check if pullsecret is missing during vm start:
And it add basic validation, it just check that provided value is valid JSON: