-
Notifications
You must be signed in to change notification settings - Fork 83
Print instruction after teardown #403
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
"sphinx-prompt", | ||
"sphinx_copybutton", | ||
"sphinx_fontawesome", | ||
"sphinxcontrib.yt", | ||
"sphinxcontrib.youtube", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
"sphinx_panels", | ||
] | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,8 +72,8 @@ func SetupFlyteDir() error { | |
return nil | ||
} | ||
|
||
// PrintDemoMessage will print sandbox success message | ||
func PrintDemoMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { | ||
// PrintDemoStartMessage will print demo start success message | ||
func PrintDemoStartMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { | ||
kubeconfig := strings.Join([]string{ | ||
"$KUBECONFIG", | ||
kubeconfigLocation, | ||
|
@@ -84,10 +84,9 @@ func PrintDemoMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bo | |
successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessagePending, flyteConsolePort) | ||
} else { | ||
successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) | ||
|
||
} | ||
fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, successMsg, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) | ||
fmt.Printf("%v Run the following command to export sandbox environment variables for accessing flytectl\n", emoji.Sparkle) | ||
fmt.Printf("%v Run the following command to export demo environment variables for accessing flytectl\n", emoji.Sparkle) | ||
fmt.Printf(" export FLYTECTL_CONFIG=%v \n", configutil.FlytectlConfig) | ||
if dryRun { | ||
fmt.Printf("%v Run the following command to export kubeconfig variables for accessing flyte pods locally\n", emoji.Sparkle) | ||
|
@@ -97,8 +96,8 @@ func PrintDemoMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bo | |
fmt.Printf("%s The Minio API is hosted on localhost:30002. Use http://localhost:30080/minio/login for Minio console\n", emoji.OpenFileFolder) | ||
} | ||
|
||
// PrintSandboxMessage will print sandbox success message | ||
func PrintSandboxMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { | ||
// PrintSandboxStartMessage will print sandbox start success message | ||
func PrintSandboxStartMessage(flyteConsolePort int, kubeconfigLocation string, dryRun bool) { | ||
kubeconfig := strings.Join([]string{ | ||
"$KUBECONFIG", | ||
kubeconfigLocation, | ||
|
@@ -109,7 +108,6 @@ func PrintSandboxMessage(flyteConsolePort int, kubeconfigLocation string, dryRun | |
successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessagePending, flyteConsolePort) | ||
} else { | ||
successMsg = fmt.Sprintf("%v http://localhost:%v/console", ProgressSuccessMessage, flyteConsolePort) | ||
|
||
} | ||
fmt.Printf("%v %v %v %v %v \n", emoji.ManTechnologist, successMsg, emoji.Rocket, emoji.Rocket, emoji.PartyPopper) | ||
fmt.Printf("%v Run the following command to export sandbox environment variables for accessing flytectl\n", emoji.Sparkle) | ||
|
@@ -120,6 +118,12 @@ func PrintSandboxMessage(flyteConsolePort int, kubeconfigLocation string, dryRun | |
} | ||
} | ||
|
||
// PrintSandboxTeardownMessage will print sandbox teardown success message | ||
func PrintSandboxTeardownMessage(flyteConsolePort int, kubeconfigLocation string) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems we don't need an equivalent for |
||
fmt.Printf("%v Run the following command to unset sandbox environment variables for accessing flytectl\n", emoji.Sparkle) | ||
fmt.Printf(" unset FLYTECTL_CONFIG \n") | ||
} | ||
|
||
// SendRequest will create request and return the response | ||
func SendRequest(method, url string, option io.Reader) (*http.Response, error) { | ||
client := &http.Client{} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,15 @@ func TestSetupFlyteDir(t *testing.T) { | |
assert.Nil(t, SetupFlyteDir()) | ||
} | ||
|
||
func TestPrintSandboxMessage(t *testing.T) { | ||
func TestPrintSandboxStartMessage(t *testing.T) { | ||
t.Run("Print Sandbox Message", func(t *testing.T) { | ||
PrintSandboxMessage(SandBoxConsolePort, docker.SandboxKubeconfig, false) | ||
PrintSandboxStartMessage(SandBoxConsolePort, docker.SandboxKubeconfig, false) | ||
}) | ||
} | ||
|
||
func TestPrintSandboxTeardownMessage(t *testing.T) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test doesn't seem to be very useful, so just for the completeness. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in all honesty, the previous test is not terribly useful either. It's fine to leave both there. |
||
t.Run("Print Sandbox Message", func(t *testing.T) { | ||
PrintSandboxTeardownMessage(SandBoxConsolePort, docker.SandboxKubeconfig) | ||
}) | ||
} | ||
|
||
|
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 did this manually. I was not able to do
make doc-requirements.txt
because pip-compile complained:So
sphinx-panels
andsphinx-prompt
don't agree with each other.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.
sphinx-panels
is no longer maintained https://github.com/executablebooks/sphinx-panels#sphinx-panels :(