-
Notifications
You must be signed in to change notification settings - Fork 91
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
Adds --insecure-validator-i-know-what-i-do flag and new args version #1570
Conversation
@@ -25,5 +25,5 @@ export const getCliArgsVersion = async ( | |||
|
|||
return logs.includes("--ws-port <PORT>") |
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.
We should check here if the flag --insecure-validator-i-know-what-i-do
is present in the output to ensure that is V2
, since could be that people are using not the latest version of polkadot.
@@ -9,7 +9,7 @@ export const getCliArgsVersion = async ( | |||
): Promise<SubstrateCliArgsVersion> => { | |||
const client = getClient() as KubeClient; | |||
// use echo to not finish the pod with error status. | |||
const fullCmd = `${command} --help | grep ws-port || echo "V1"`; | |||
const fullCmd = `${command} --help | grep ws-port || echo "V2"`; |
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.
Since we are checking the output later we should grep for both flags or just remove the grep
and use the full help output.
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.
I'm a bit confused how this works. Why do we echo "v1"
? Indeed, it seems like we can just remove the grep in favor of the log checks further down. How could I do that?
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.
Yes, let just remove the grep
. The main logic behind that echo was to ensure the exit code from the cmd was 0
.
Thanks!
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.
Can we just make it echo ""
to avoid confusion? 🤔
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 I get how it works now! Pushed the change. Thanks!
Hi @mrcnski, thanks for your help 🚀, looks great!!! There are a couple of things to change to make it full backward compatible. If you want I can just add those things. Again, thanks for your help!! 🙌 |
Hi @mrcnski, I just pushed some lint fixes. I think now test should pass and would be ready to go :) NOTE to me: for a followup pr we can improve the logic to have the check in one place and make the providers only |
I did my best but you'll probably have to clean up after me. 😂
Some things I'm not sure about:
closes #1551