forked from flyteorg/flyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support new sandbox-bundled features (flyteorg#381)
* Create a docker volume to persist database and object store Signed-off-by: Jeev B <[email protected]> * Cleanup sandbox configuration directory and mount Signed-off-by: Jeev B <[email protected]> * Add logic for backward-compatible demo reload Signed-off-by: Jeev B <[email protected]> * Fix working directory for exec Signed-off-by: Jeev B <[email protected]> * Generate mocks Signed-off-by: Jeev B <[email protected]> * Get existing tests passing Signed-off-by: Jeev B <[email protected]> * Cleanup volume creation and add a dryRun message Signed-off-by: Jeev B <[email protected]> * Use fmt.Errorf in place of errors.New Signed-off-by: Jeev B <[email protected]> * Fix build Signed-off-by: Jeev B <[email protected]> * Add tests for volume creation Signed-off-by: Jeev B <[email protected]> * Add test for volume teardown Signed-off-by: Jeev B <[email protected]> * Include code path for volume creation in sandbox start test Signed-off-by: Jeev B <[email protected]> * Add tests for demo reload with backward compatibility Signed-off-by: Jeev B <[email protected]> * Suppress output of `which` when testing for sandbox version during demo reload --------- Signed-off-by: Jeev B <[email protected]>
- Loading branch information
1 parent
e684a53
commit fb1f3bf
Showing
16 changed files
with
427 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package sandbox | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/spf13/pflag" | ||
) | ||
|
||
type TeardownFlags struct { | ||
Volume bool | ||
} | ||
|
||
var ( | ||
DefaultTeardownFlags = &TeardownFlags{} | ||
) | ||
|
||
func (f *TeardownFlags) GetPFlagSet(prefix string) *pflag.FlagSet { | ||
cmdFlags := pflag.NewFlagSet("TeardownFlags", pflag.ExitOnError) | ||
cmdFlags.BoolVarP(&f.Volume, fmt.Sprintf("%v%v", prefix, "volume"), "v", f.Volume, "Optional. Clean up Docker volume. This will result in a permanent loss of all data within the database and object store. Use with caution!") | ||
return cmdFlags | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.