lotus-provider: Move --layers to top-level

This commit is contained in:
Łukasz Magiera 2024-02-12 18:03:47 +01:00
parent f2f1cc30ec
commit ee31932731
3 changed files with 9 additions and 24 deletions

View File

@ -48,7 +48,7 @@ func main() {
configCmd, configCmd,
testCmd, testCmd,
webCmd, webCmd,
pipelineCmd, sealCmd,
} }
jaeger := tracing.SetupJaegerTracing("lotus") jaeger := tracing.SetupJaegerTracing("lotus")
@ -124,10 +124,10 @@ func main() {
Hidden: true, Hidden: true,
Value: "5433", Value: "5433",
}, },
&cli.StringFlag{ &cli.StringSliceFlag{
Name: "layers", Name: "layers",
EnvVars: []string{"LOTUS_LAYERS", "LOTUS_CONFIG_LAYERS"}, Usage: "list of layers to be interpreted (atop defaults). Default: base",
Value: "base", Value: cli.NewStringSlice("base"),
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: deps.FlagRepoPath, Name: deps.FlagRepoPath,

View File

@ -17,15 +17,15 @@ import (
"github.com/filecoin-project/lotus/provider/lpseal" "github.com/filecoin-project/lotus/provider/lpseal"
) )
var pipelineCmd = &cli.Command{ var sealCmd = &cli.Command{
Name: "pipeline", Name: "seal",
Usage: "Manage the sealing pipeline", Usage: "Manage the sealing pipeline",
Subcommands: []*cli.Command{ Subcommands: []*cli.Command{
pipelineStartCmd, sealStartCmd,
}, },
} }
var pipelineStartCmd = &cli.Command{ var sealStartCmd = &cli.Command{
Name: "start", Name: "start",
Usage: "Start new sealing operations manually", Usage: "Start new sealing operations manually",
Flags: []cli.Flag{ Flags: []cli.Flag{
@ -52,11 +52,6 @@ var pipelineStartCmd = &cli.Command{
Usage: "Use synthetic PoRep", Usage: "Use synthetic PoRep",
Value: false, // todo implement synthetic Value: false, // todo implement synthetic
}, },
&cli.StringSliceFlag{ // todo consider moving layers top level
Name: "layers",
Usage: "list of layers to be interpreted (atop defaults). Default: base",
Value: cli.NewStringSlice("base"),
},
}, },
Action: func(cctx *cli.Context) error { Action: func(cctx *cli.Context) error {
if !cctx.Bool("now") { if !cctx.Bool("now") {

View File

@ -50,11 +50,6 @@ var runCmd = &cli.Command{
Usage: "manage open file limit", Usage: "manage open file limit",
Value: true, Value: true,
}, },
&cli.StringSliceFlag{
Name: "layers",
Usage: "list of layers to be interpreted (atop defaults). Default: base",
Value: cli.NewStringSlice("base"),
},
&cli.StringFlag{ &cli.StringFlag{
Name: "storage-json", Name: "storage-json",
Usage: "path to json file containing storage config", Usage: "path to json file containing storage config",
@ -150,11 +145,6 @@ var webCmd = &cli.Command{
Usage: "Address to listen on", Usage: "Address to listen on",
Value: "127.0.0.1:4701", Value: "127.0.0.1:4701",
}, },
&cli.StringSliceFlag{
Name: "layers",
Usage: "list of layers to be interpreted (atop defaults). Default: base. Web will be added",
Value: cli.NewStringSlice("base"),
},
&cli.BoolFlag{ &cli.BoolFlag{
Name: "nosync", Name: "nosync",
Usage: "don't check full-node sync status", Usage: "don't check full-node sync status",