diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 324489b7..3537c335 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,30 +8,28 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: 1.21 - - name: golangci-lint - uses: golangci/golangci-lint-action@v4 - with: - version: v1.56.2 - args: --skip-dirs tests --modules-download-mode mod --timeout 10m --verbose + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - name: golangci-lint + uses: golangci/golangci-lint-action@v4 + with: + version: v1.56.2 + skip-pkg-cache: true + args: --skip-dirs tests --timeout 10m --verbose build: runs-on: ubuntu-latest steps: + - name: Check out code + uses: actions/checkout@v4 - name: Set up Go 1.x uses: actions/setup-go@v5 with: - go-version: ^1.21 - - - name: Check out code - uses: actions/checkout@v4 - + go-version-file: go.mod - name: Build run: go build -v ./ - - name: Store funnel uses: actions/upload-artifact@v4 with: @@ -41,12 +39,12 @@ jobs: unitTest: runs-on: ubuntu-latest steps: + - name: Check out code + uses: actions/checkout@v4 - name: Set up Go 1.x uses: actions/setup-go@v5 with: - go-version: ^1.21 - - name: Check out code - uses: actions/checkout@v4 + go-version-file: go.mod - name: Unit Tests run: make test @@ -56,14 +54,12 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 - - - name: Download funnel bin - uses: actions/download-artifact@v4 + - name: Set up Go 1.x + uses: actions/setup-go@v5 with: - name: funnelBin + go-version-file: go.mod - name: MongoTest run: | - chmod +x funnel make start-mongodb sleep 10 make test-mongodb @@ -74,12 +70,9 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 - - - name: Download funnel bin - uses: actions/download-artifact@v4 + - name: Set up Go 1.x + uses: actions/setup-go@v5 with: - name: funnelBin + go-version-file: go.mod - name: Badger Test - run: | - chmod +x funnel - make test-badger + run: make test-badger diff --git a/Makefile b/Makefile index 783bbaa0..f44b8523 100644 --- a/Makefile +++ b/Makefile @@ -37,22 +37,16 @@ build: # Generate the protobuf/gRPC code proto: - @cd tes && protoc \ + @protoc \ $(PROTO_INC) \ - --go_out=plugins=grpc:. \ - --grpc-gateway_out=logtostderr=true:. \ - tes.proto - @cd compute/scheduler && protoc \ - $(PROTO_INC) \ - --go_out=plugins=grpc:. \ - --grpc-gateway_out=logtostderr=true:. \ - scheduler.proto - @cd events && protoc \ - $(PROTO_INC) \ - -I ../tes \ - --go_out=Mtes.proto=github.com/ohsu-comp-bio/funnel/tes,plugins=grpc:. \ - --grpc-gateway_out=logtostderr=true:. \ - events.proto + --go_out=. --go_opt=paths=source_relative \ + --go-grpc_out=require_unimplemented_servers=false:. --go-grpc_opt=paths=source_relative \ + --grpc-gateway_out=. \ + --grpc-gateway_opt=paths=source_relative \ + --grpc-gateway_opt=generate_unbound_methods=true \ + tes/tes.proto \ + compute/scheduler/scheduler.proto \ + events/events.proto # Start API reference doc server serve-doc: diff --git a/cmd/aws/batch/createall.go b/cmd/aws/batch/createall.go index dd5d393c..48713ee2 100644 --- a/cmd/aws/batch/createall.go +++ b/cmd/aws/batch/createall.go @@ -44,7 +44,10 @@ var createCmd = &cobra.Command{ if funnelConfigFile != "" { funnelConf := config.Config{} - config.ParseFile(funnelConfigFile, &funnelConf) + err := config.ParseFile(funnelConfigFile, &funnelConf) + if err != nil { + return err + } conf.Funnel = funnelConf } diff --git a/cmd/aws/batch/createjobdef.go b/cmd/aws/batch/createjobdef.go index c6118647..61f66ab1 100644 --- a/cmd/aws/batch/createjobdef.go +++ b/cmd/aws/batch/createjobdef.go @@ -38,7 +38,10 @@ var jobDefCmd = &cobra.Command{ if funnelConfigFile != "" { funnelConf := config.Config{} - config.ParseFile(funnelConfigFile, &funnelConf) + err := config.ParseFile(funnelConfigFile, &funnelConf) + if err != nil { + return err + } conf.Funnel = funnelConf } diff --git a/cmd/completion.go b/cmd/completion.go index 3e3ab0c5..e9e4be19 100644 --- a/cmd/completion.go +++ b/cmd/completion.go @@ -1,6 +1,7 @@ package cmd import ( + "fmt" "os" "github.com/spf13/cobra" @@ -17,7 +18,10 @@ var bash = &cobra.Command{ Long: `This command generates bash CLI completion code. Add "source <(funnel completion bash)" to your bash profile.`, Run: func(cmd *cobra.Command, args []string) { - RootCmd.GenBashCompletion(os.Stdout) + if err := RootCmd.GenBashCompletion(os.Stdout); err != nil { + fmt.Printf("Detected error while running GenBashCompletion "+ + "command: %s\n", err) + } }, } diff --git a/cmd/examples/examples.go b/cmd/examples/examples.go index 8f8964a5..9d8fc82f 100644 --- a/cmd/examples/examples.go +++ b/cmd/examples/examples.go @@ -20,7 +20,7 @@ var Cmd = &cobra.Command{ byShortName := map[string]string{} taskEx := ex.Examples() for n, v := range taskEx { - byShortName[n] = v + byShortName[n] = string(v) } confEx := config.Examples() diff --git a/cmd/node/run.go b/cmd/node/run.go index c0492273..5c127dd9 100644 --- a/cmd/node/run.go +++ b/cmd/node/run.go @@ -2,6 +2,7 @@ package node import ( "context" + "fmt" "os" "os/signal" "syscall" @@ -25,7 +26,10 @@ func Run(ctx context.Context, conf config.Config, log *logger.Logger) error { if err != nil { return err } - w.Run(ctx) + + if err := w.Run(ctx); err != nil { + fmt.Printf("Detected error while running a node: %s\n", err) + } return nil } @@ -34,9 +38,7 @@ func Run(ctx context.Context, conf config.Config, log *logger.Logger) error { return err } - runctx, cancel := context.WithCancel(context.Background()) - runctx = util.SignalContext(ctx, time.Nanosecond, syscall.SIGINT, syscall.SIGTERM) - defer cancel() + runctx := util.SignalContext(ctx, time.Nanosecond, syscall.SIGINT, syscall.SIGTERM) hupsig := make(chan os.Signal, 1) go func() { diff --git a/cmd/run/cmd.go b/cmd/run/cmd.go index a3042684..086b7d80 100644 --- a/cmd/run/cmd.go +++ b/cmd/run/cmd.go @@ -2,6 +2,7 @@ package run import ( "bufio" + "fmt" "os" "github.com/kballard/go-shellquote" @@ -20,11 +21,7 @@ var Cmd = &cobra.Command{ Use: "run 'CMD' [flags]", Short: "Run a task.", RunE: func(cmd *cobra.Command, args []string) error { - err := Run(args) - if err != nil { - //cmd.Usage() - } - return err + return Run(args) }, DisableFlagParsing: true, } @@ -116,7 +113,9 @@ func scatter(base flagVals) []flagVals { // Per-scatter flags sp, _ := shellquote.Split(scanner.Text()) tv := base - parseTaskArgs(&tv, sp) + if err := parseTaskArgs(&tv, sp); err != nil { + fmt.Printf("Failed to parse task args: %s\n", err) + } // Parse scatter file flags into new flagVals out = append(out, tv) } diff --git a/cmd/run/flags.go b/cmd/run/flags.go index 2a2befc7..b57d4d88 100644 --- a/cmd/run/flags.go +++ b/cmd/run/flags.go @@ -158,7 +158,10 @@ func parseTopLevelArgs(vals *flagVals, args []string) error { shCmd := flags.Args()[0] args = append([]string{"--sh", shCmd}, args...) } - parseTaskArgs(vals, args) + + if err = parseTaskArgs(vals, args); err != nil { + return err + } if len(vals.execs) == 0 { return fmt.Errorf("you must specify a command to run") @@ -170,10 +173,15 @@ func parseTopLevelArgs(vals *flagVals, args []string) error { return nil } -func parseTaskArgs(vals *flagVals, args []string) { +func parseTaskArgs(vals *flagVals, args []string) error { fl := newFlags(vals) - fl.Parse(args) + + if err := fl.Parse(args); err != nil { + return fmt.Errorf("failed to parse task arguments: %w", err) + } + buildExecs(fl, vals, args) + return nil } // Visit flags to determine commands + stdin/out/err @@ -185,7 +193,7 @@ func parseTaskArgs(vals *flagVals, args []string) { func buildExecs(flags *pflag.FlagSet, vals *flagVals, args []string) { vals.execs = nil var exec *executor - flags.ParseAll(args, func(f *pflag.Flag, value string) error { + err := flags.ParseAll(args, func(f *pflag.Flag, value string) error { switch f.Name { case "sh", "exec": if exec != nil { @@ -207,6 +215,9 @@ func buildExecs(flags *pflag.FlagSet, vals *flagVals, args []string) { } return nil }) + if err != nil { + fmt.Printf("Failed to parse some flags: %s\n", err) + } if exec != nil { vals.execs = append(vals.execs, *exec) } diff --git a/cmd/run/parse_vars.go b/cmd/run/parse_vars.go index 3777773d..5b4bf45c 100644 --- a/cmd/run/parse_vars.go +++ b/cmd/run/parse_vars.go @@ -3,7 +3,7 @@ package run import ( "errors" "fmt" - "io/ioutil" + "os" "path/filepath" "regexp" "strings" @@ -13,14 +13,14 @@ import ( ) // ErrKeyFmt describes an error in input/output/env/tag flag formatting -var ErrKeyFmt = errors.New("Arguments passed to --in, --out, --tag and --env must be of the form: KEY=VALUE") +var ErrKeyFmt = errors.New("arguments passed to --in, --out, --tag and --env must be of the form: KEY=VALUE") -// ErrStorageScheme describes an error in supported storage URL schemes. -var ErrStorageScheme = errors.New("File paths must be prefixed with one of:\n file://\n gs://\n s3://") +// StorageScheme describes an error in supported storage URL schemes. +var ErrStorageScheme = errors.New("file paths must be prefixed with one of:\n file://\n gs://\n s3://") // DuplicateKeyErr returns a new error describing conflicting keys for env. vars., inputs, and outputs. func DuplicateKeyErr(key string) error { - return errors.New("Can't use the same KEY for multiple --in, --out, --tag, --env arguments: " + key) + return errors.New("can't use the same KEY for multiple --in, --out, --tag, --env arguments: " + key) } // Parse CLI variable definitions (e.g "varname=value") into usable task values. @@ -197,7 +197,7 @@ func valsToTask(vals flagVals) (task *tes.Task, err error) { } func getContent(p string) string { - b, err := ioutil.ReadFile(p) + b, err := os.ReadFile(p) if err != nil { panic(err) } @@ -217,14 +217,6 @@ func parseCliVar(raw string) (string, string) { return key, val } -// Give a input/output URL "raw", return the path of the file -// relative to the container. -func containerPath(raw, base string) string { - url := resolvePath(raw) - p := stripStoragePrefix(url) - return base + p -} - func stripStoragePrefix(url string) string { re := regexp.MustCompile("[a-z0-9]+://") if !re.MatchString(url) { diff --git a/cmd/run/task_group.go b/cmd/run/task_group.go index 64cc7026..06ddb848 100644 --- a/cmd/run/task_group.go +++ b/cmd/run/task_group.go @@ -49,17 +49,20 @@ func (tg *taskGroup) _run(task *tes.Task, wait bool, waitFor []string) error { if tg.printTask { // Marshal message to JSON - taskJSON, merr := tg.client.Marshaler.MarshalToString(task) + taskJSON, merr := tg.client.Marshaler.Marshal(task) if merr != nil { return merr } - fmt.Println(taskJSON) + fmt.Println(string(taskJSON)) return nil } if len(waitFor) > 0 { for _, tid := range waitFor { - tg.client.WaitForTask(context.Background(), tid) + err := tg.client.WaitForTask(context.Background(), tid) + if err != nil { + return err + } } } diff --git a/cmd/server/run.go b/cmd/server/run.go index 869edfa4..db662956 100644 --- a/cmd/server/run.go +++ b/cmd/server/run.go @@ -260,7 +260,7 @@ func NewServer(ctx context.Context, conf config.Config, log *logger.Logger) (*Se return &Server{ Server: &server.Server{ - RPCAddress: ":" + conf.Server.RPCPort, + RPCAddress: conf.Server.RPCAddress(), HTTPPort: conf.Server.HTTPPort, BasicAuth: conf.Server.BasicAuth, OidcAuth: conf.Server.OidcAuth, diff --git a/cmd/storage/storage.go b/cmd/storage/storage.go index 4da3d9d0..9b5d1410 100644 --- a/cmd/storage/storage.go +++ b/cmd/storage/storage.go @@ -4,16 +4,15 @@ import ( "context" "encoding/json" "fmt" - "io" "os" - "github.com/golang/protobuf/jsonpb" cmdutil "github.com/ohsu-comp-bio/funnel/cmd/util" "github.com/ohsu-comp-bio/funnel/config" "github.com/ohsu-comp-bio/funnel/logger" "github.com/ohsu-comp-bio/funnel/storage" "github.com/ohsu-comp-bio/funnel/tes" "github.com/spf13/cobra" + "google.golang.org/protobuf/encoding/protojson" ) var log = logger.NewLogger("storage", logger.DefaultConfig()) @@ -90,45 +89,39 @@ func NewCommand() *cobra.Command { return fmt.Errorf("creating storage clients: %s", err) } - f, err := os.Open(args[0]) + data, err := os.ReadFile(args[0]) if err != nil { return fmt.Errorf("opening task file: %s", err) } - defer f.Close() - dec := json.NewDecoder(f) - for { - task := &tes.Task{} - err := jsonpb.UnmarshalNext(dec, task) - if err == io.EOF { - break - } + task := &tes.Task{} + err = protojson.Unmarshal(data, task) + + if err != nil { + fmt.Fprintf(os.Stderr, "error: %s\n", err) + return err + } + + for _, in := range task.Inputs { + obj, err := store.Stat(context.Background(), in.Url) if err != nil { fmt.Fprintf(os.Stderr, "error: %s\n", err) continue } - for _, in := range task.Inputs { - obj, err := store.Stat(context.Background(), in.Url) - if err != nil { - fmt.Fprintf(os.Stderr, "error: %s\n", err) - continue - } + b, _ := json.Marshal(obj) + fmt.Println(string(b)) + } - b, _ := json.Marshal(obj) - fmt.Println(string(b)) + for _, out := range task.Outputs { + obj, err := store.Stat(context.Background(), out.Url) + if err != nil { + fmt.Fprintf(os.Stderr, "error: %s\n", err) + continue } - for _, out := range task.Outputs { - obj, err := store.Stat(context.Background(), out.Url) - if err != nil { - fmt.Fprintf(os.Stderr, "error: %s\n", err) - continue - } - - b, _ := json.Marshal(obj) - fmt.Println(string(b)) - } + b, _ := json.Marshal(obj) + fmt.Println(string(b)) } return nil diff --git a/cmd/task/cancel.go b/cmd/task/cancel.go index 72f3be5d..d8df85e1 100644 --- a/cmd/task/cancel.go +++ b/cmd/task/cancel.go @@ -24,11 +24,11 @@ func Cancel(server string, ids []string, writer io.Writer) error { return err } // CancelTaskResponse is an empty struct - out, err := cli.Marshaler.MarshalToString(resp) + out, err := cli.Marshaler.Marshal(resp) if err != nil { return err } - res = append(res, out) + res = append(res, string(out)) } for _, x := range res { diff --git a/cmd/task/create.go b/cmd/task/create.go index c79e1a5b..e842048b 100644 --- a/cmd/task/create.go +++ b/cmd/task/create.go @@ -1,12 +1,12 @@ package task import ( - "encoding/json" "fmt" "io" "os" - "github.com/golang/protobuf/jsonpb" + "encoding/json" + "github.com/ohsu-comp-bio/funnel/tes" "golang.org/x/net/context" ) @@ -22,17 +22,17 @@ func Create(server string, files []string, reader io.Reader, writer io.Writer) e for _, taskFile := range files { f, err := os.Open(taskFile) - defer f.Close() if err != nil { return err } + defer f.Close() reader = io.MultiReader(reader, f) } dec := json.NewDecoder(reader) for { var task tes.Task - err := jsonpb.UnmarshalNext(dec, &task) + err := dec.Decode(&task) if err == io.EOF { break } diff --git a/cmd/task/get.go b/cmd/task/get.go index 3f899a92..60339204 100644 --- a/cmd/task/get.go +++ b/cmd/task/get.go @@ -32,11 +32,11 @@ func Get(server string, ids []string, taskView string, w io.Writer) error { if err != nil { return err } - out, err := cli.Marshaler.MarshalToString(resp) + out, err := cli.Marshaler.Marshal(resp) if err != nil { return err } - res = append(res, out) + res = append(res, string(out)) } for _, x := range res { diff --git a/cmd/task/list.go b/cmd/task/list.go index 94a96c11..eb4be7d6 100644 --- a/cmd/task/list.go +++ b/cmd/task/list.go @@ -62,11 +62,11 @@ func List(server, taskView, pageToken, stateFilter string, tagsFilter []string, } } - response, err := cli.Marshaler.MarshalToString(output) + response, err := cli.Marshaler.Marshal(output) if err != nil { return fmt.Errorf("marshaling error: %v", err) } - fmt.Fprintf(writer, "%s\n", response) + fmt.Fprintf(writer, "%s\n", string(response)) return nil } diff --git a/cmd/task/task_test.go b/cmd/task/task_test.go index 09159502..d51fa59b 100644 --- a/cmd/task/task_test.go +++ b/cmd/task/task_test.go @@ -20,7 +20,11 @@ func TestGet(t *testing.T) { } cmd.SetArgs([]string{"get", "--view", "MINIMAL", "1", "2"}) - cmd.Execute() + err := cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } } // "get" command should have default view of FULL @@ -35,7 +39,11 @@ func TestGetDefaultView(t *testing.T) { } cmd.SetArgs([]string{"get", "1", "2"}) - cmd.Execute() + err := cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } } func TestList(t *testing.T) { @@ -49,7 +57,11 @@ func TestList(t *testing.T) { } cmd.SetArgs([]string{"list", "--view", "FULL"}) - cmd.Execute() + err := cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } } // Test that the server URL defaults to localhost:8000 @@ -88,19 +100,39 @@ func TestServerDefault(t *testing.T) { } cmd.SetArgs([]string{"create", "foo.json"}) - cmd.Execute() + err := cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"list"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"get", "1"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"cancel", "1"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"wait", "1"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } } // Test that the server URL may be set via a FUNNEL_SERVER environment @@ -142,19 +174,39 @@ func TestServerEnv(t *testing.T) { } cmd.SetArgs([]string{"create", "foo.json"}) - cmd.Execute() + err := cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"list"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"get", "1"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"cancel", "1"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"wait", "1"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } } // Test that the server flag overrides the FUNNEL_SERVER env var @@ -196,17 +248,37 @@ func TestServerFlagOverride(t *testing.T) { } cmd.SetArgs([]string{"create", "-S", srv, "foo.json"}) - cmd.Execute() + err := cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"list", "-S", srv}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"get", "-S", srv, "1"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"cancel", "-S", srv, "1"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } cmd.SetArgs([]string{"wait", "-S", srv, "1"}) - cmd.Execute() + err = cmd.Execute() + + if err != nil { + t.Errorf("Command execution failed: %s", err) + } } diff --git a/cmd/termdash/compact/grid.go b/cmd/termdash/compact/grid.go index 3bdcf6ab..c14634cc 100644 --- a/cmd/termdash/compact/grid.go +++ b/cmd/termdash/compact/grid.go @@ -61,7 +61,5 @@ func (cg *Grid) Buffer() ui.Buffer { } func (cg *Grid) AddRows(rows ...ui.GridBufferer) { - for _, r := range rows { - cg.Rows = append(cg.Rows, r) - } + cg.Rows = append(cg.Rows, rows...) } diff --git a/cmd/termdash/config/main.go b/cmd/termdash/config/main.go index df959a64..59830872 100644 --- a/cmd/termdash/config/main.go +++ b/cmd/termdash/config/main.go @@ -9,10 +9,6 @@ var ( ) func Init() { - for _, p := range params { - GlobalParams = append(GlobalParams, p) - } - for _, s := range switches { - GlobalSwitches = append(GlobalSwitches, s) - } + GlobalParams = append(GlobalParams, params...) + GlobalSwitches = append(GlobalSwitches, switches...) } diff --git a/cmd/termdash/config/switch.go b/cmd/termdash/config/switch.go index 87ad942e..3cc5bc94 100644 --- a/cmd/termdash/config/switch.go +++ b/cmd/termdash/config/switch.go @@ -46,6 +46,6 @@ func GetSwitchVal(k string) bool { // Toggle a boolean switch func Toggle(k string) { sw := GetSwitch(k) - newVal := sw.Val != true + newVal := !sw.Val sw.Val = newVal } diff --git a/cmd/termdash/tasksource.go b/cmd/termdash/tasksource.go index 3ca17898..79faac34 100644 --- a/cmd/termdash/tasksource.go +++ b/cmd/termdash/tasksource.go @@ -88,9 +88,8 @@ func (ts *TaskSource) List(previous, next bool) (TaskWidgets, error) { } ts.lock.Lock() - for _, t := range ts.tasks { - tasks = append(tasks, t) - } + tasks = make([]*TaskWidget, len(ts.tasks)) + copy(tasks, ts.tasks) ts.lock.Unlock() sort.Sort(tasks) diff --git a/cmd/termdash/widgets/input.go b/cmd/termdash/widgets/input.go index e8377585..5fb1677a 100644 --- a/cmd/termdash/widgets/input.go +++ b/cmd/termdash/widgets/input.go @@ -80,7 +80,7 @@ func (i *Input) KeyPress(e ui.Event) { if len(i.Data) >= i.MaxLen { return } - if strings.Index(inputChars, ch) > -1 { + if strings.Contains(inputChars, ch) { i.Data += ch i.stream <- i.Data ui.Render(i) diff --git a/cmd/util/config.go b/cmd/util/config.go index c017e3a7..9863c0ad 100644 --- a/cmd/util/config.go +++ b/cmd/util/config.go @@ -2,7 +2,6 @@ package util import ( "fmt" - "io/ioutil" "math/rand" "os" "path/filepath" @@ -62,7 +61,7 @@ func MergeConfigFileWithFlags(file string, flagConf config.Config) (config.Confi // - "path" is the path of the file. // - "cleanup" can be called to remove the temporary file. func TempConfigFile(c config.Config, name string) (path string, cleanup func()) { - tmpdir, err := ioutil.TempDir("", "") + tmpdir, err := os.MkdirTemp("", "") if err != nil { panic(err) } diff --git a/cmd/util/reader.go b/cmd/util/reader.go index 9f0b9990..498f382c 100644 --- a/cmd/util/reader.go +++ b/cmd/util/reader.go @@ -3,13 +3,12 @@ package util import ( "bytes" "io" - "io/ioutil" "os" ) // EmptyReader returns an io.Reader which is empty and immediately closed. func EmptyReader() io.Reader { - return ioutil.NopCloser(bytes.NewReader(nil)) + return io.NopCloser(bytes.NewReader(nil)) } // StdinPipe will return stdin if it's available, otherwise it will return diff --git a/cmd/worker/run.go b/cmd/worker/run.go index 960066bb..7b8edac9 100644 --- a/cmd/worker/run.go +++ b/cmd/worker/run.go @@ -3,7 +3,7 @@ package worker import ( "context" "fmt" - "io/ioutil" + "os" "strings" "github.com/ohsu-comp-bio/funnel/config" @@ -72,7 +72,7 @@ func NewWorker(ctx context.Context, conf config.Config, log *logger.Logger, opts store.AttachLogger(log) if conf.Kubernetes.ExecutorTemplateFile != "" { - content, err := ioutil.ReadFile(conf.Kubernetes.ExecutorTemplateFile) + content, err := os.ReadFile(conf.Kubernetes.ExecutorTemplateFile) if err != nil { return nil, fmt.Errorf("reading template: %v", err) } @@ -83,7 +83,7 @@ func NewWorker(ctx context.Context, conf config.Config, log *logger.Logger, opts var executor = worker.Executor{ Backend: "docker", } - + if conf.Kubernetes.Executor == "kubernetes" { executor.Backend = "kubernetes" executor.Template = conf.Kubernetes.ExecutorTemplate @@ -91,11 +91,11 @@ func NewWorker(ctx context.Context, conf config.Config, log *logger.Logger, opts } return &worker.DefaultWorker{ - Executor: executor, - Conf: conf.Worker, - Store: store, - TaskReader: reader, - EventWriter: writer, + Executor: executor, + Conf: conf.Worker, + Store: store, + TaskReader: reader, + EventWriter: writer, }, nil } diff --git a/cmd/worker/worker_test.go b/cmd/worker/worker_test.go index e280601d..8cb97fd6 100644 --- a/cmd/worker/worker_test.go +++ b/cmd/worker/worker_test.go @@ -65,7 +65,9 @@ func TestTaskFileOption(t *testing.T) { } c.SetArgs([]string{"run", "--taskFile", "test.task.json"}) - c.Execute() + if err := c.Execute(); err != nil { + t.Error(err) + } h.Run = func(ctx context.Context, conf config.Config, log *logger.Logger, opts *Options) error { if opts.TaskFile != "test.task.json" { @@ -75,7 +77,9 @@ func TestTaskFileOption(t *testing.T) { } c.SetArgs([]string{"run", "-f", "test.task.json"}) - c.Execute() + if err := c.Execute(); err != nil { + t.Error(err) + } h.Run = func(ctx context.Context, conf config.Config, log *logger.Logger, opts *Options) error { if opts.TaskBase64 != "abcd" { @@ -85,7 +89,9 @@ func TestTaskFileOption(t *testing.T) { } c.SetArgs([]string{"run", "--taskBase64", "abcd"}) - c.Execute() + if err := c.Execute(); err != nil { + t.Error(err) + } h.Run = func(ctx context.Context, conf config.Config, log *logger.Logger, opts *Options) error { if opts.TaskBase64 != "abcd" { @@ -95,5 +101,7 @@ func TestTaskFileOption(t *testing.T) { } c.SetArgs([]string{"run", "-b", "abcd"}) - c.Execute() + if err := c.Execute(); err != nil { + t.Error(err) + } } diff --git a/compute/batch/backend.go b/compute/batch/backend.go index 1103ac4b..5e4d27c8 100644 --- a/compute/batch/backend.go +++ b/compute/batch/backend.go @@ -88,26 +88,31 @@ func (b *Backend) Submit(task *tes.Task) error { if task.Resources != nil { ram := int64(task.Resources.RamGb * 953.674) if ram > 0 { - req.ContainerOverrides.Memory = aws.Int64(ram) + req.ContainerOverrides.SetMemory(ram) } vcpus := int64(task.Resources.CpuCores) if vcpus > 0 { - req.ContainerOverrides.Vcpus = aws.Int64(vcpus) + req.ContainerOverrides.SetVcpus(vcpus) } } resp, err := b.client.SubmitJob(req) if err != nil { - b.event.WriteEvent(ctx, events.NewState(task.Id, tes.SystemError)) - b.event.WriteEvent( - ctx, - events.NewSystemLog( - task.Id, 0, 0, "error", - "error submitting task to AWSBatch", - map[string]string{"error": err.Error()}, - ), + if err2 := b.event.WriteEvent(ctx, events.NewState(task.Id, tes.SystemError)); err2 != nil { + b.log.Error("Detected error while writing SystemError event", err2) + } + + sl := events.NewSystemLog( + task.Id, 0, 0, "error", + "error submitting task to AWSBatch", + map[string]string{"error": err.Error()}, ) + + if err2 := b.event.WriteEvent(ctx, sl); err2 != nil { + b.log.Error("Detected error while writing SystemLog event", err2) + } + return err } @@ -213,15 +218,19 @@ ReconcileLoop: jstate := *j.Status if jstate == "FAILED" { - b.event.WriteEvent(ctx, events.NewState(task.Id, tes.SystemError)) - b.event.WriteEvent( - ctx, - events.NewSystemLog( - task.Id, 0, 0, "error", - "AWSBatch job in FAILED state", - map[string]string{"error": *j.StatusReason, "awsbatch_id": *j.JobId}, - ), + if err2 := b.event.WriteEvent(ctx, events.NewState(task.Id, tes.SystemError)); err2 != nil { + b.log.Error("Detected error while writing SystemError event", err2) + } + + sl := events.NewSystemLog( + task.Id, 0, 0, "error", + "AWSBatch job in FAILED state", + map[string]string{"error": *j.StatusReason, "awsbatch_id": *j.JobId}, ) + + if err2 := b.event.WriteEvent(ctx, sl); err2 != nil { + b.log.Error("Detected error while writing SystemLog event", err2) + } } } diff --git a/compute/gridengine/backend.go b/compute/gridengine/backend.go index a9e6e82a..3a254a9a 100644 --- a/compute/gridengine/backend.go +++ b/compute/gridengine/backend.go @@ -3,7 +3,7 @@ package gridengine import ( "fmt" - "io/ioutil" + "os" "regexp" "github.com/ohsu-comp-bio/funnel/compute" @@ -16,7 +16,7 @@ import ( // NewBackend returns a new Grid Engine HPCBackend instance. func NewBackend(conf config.Config, reader tes.ReadOnlyServer, writer events.Writer, log *logger.Logger) (*compute.HPCBackend, error) { if conf.GridEngine.TemplateFile != "" { - content, err := ioutil.ReadFile(conf.GridEngine.TemplateFile) + content, err := os.ReadFile(conf.GridEngine.TemplateFile) if err != nil { return nil, fmt.Errorf("reading template: %v", err) } diff --git a/compute/hpc_backend.go b/compute/hpc_backend.go index db4ba060..1d386bab 100644 --- a/compute/hpc_backend.go +++ b/compute/hpc_backend.go @@ -74,15 +74,20 @@ func (b *HPCBackend) Submit(task *tes.Task) error { err = cmd.Run() if err != nil { - b.Event.WriteEvent(ctx, events.NewState(task.Id, tes.SystemError)) - b.Event.WriteEvent( - ctx, - events.NewSystemLog( - task.Id, 0, 0, "error", - "error submitting task to "+b.Name, - map[string]string{"error": err.Error(), "stderr": stderr.String(), "stdout": stdout.String()}, - ), + if err2 := b.Event.WriteEvent(ctx, events.NewState(task.Id, tes.SystemError)); err2 != nil { + b.Log.Error("Detected error while writing SystemError event", err2) + } + + sl := events.NewSystemLog( + task.Id, 0, 0, "error", + "error submitting task to "+b.Name, + map[string]string{"error": err.Error(), "stderr": stderr.String(), "stdout": stdout.String()}, ) + + if err2 := b.Event.WriteEvent(ctx, sl); err2 != nil { + b.Log.Error("Detected error while writing SystemLog event", err2) + } + return err } @@ -193,21 +198,28 @@ ReconcileLoop: } if t.TESState == tes.SystemError { - b.Event.WriteEvent(ctx, events.NewState(task.Id, tes.SystemError)) - b.Event.WriteEvent( - ctx, - events.NewSystemLog( - task.Id, 0, 0, "error", - b.Name+" reports system error for task", - map[string]string{ - "error": t.Reason, - b.Name + "_id": t.ID, - b.Name + "_state": t.State, - }, - ), + if err2 := b.Event.WriteEvent(ctx, events.NewState(task.Id, tes.SystemError)); err2 != nil { + b.Log.Error("Detected error while writing SystemError event", err2) + } + + sl := events.NewSystemLog( + task.Id, 0, 0, "error", + b.Name+" reports system error for task", + map[string]string{ + "error": t.Reason, + b.Name + "_id": t.ID, + b.Name + "_state": t.State, + }, ) + + if err2 := b.Event.WriteEvent(ctx, sl); err2 != nil { + b.Log.Error("Detected error while writing SystemLog event", err2) + } + if t.Remove { - exec.Command(b.CancelCmd, t.ID).Run() + if err2 := exec.Command(b.CancelCmd, t.ID).Run(); err2 != nil { + b.Log.Error("Detected error while running Cancel command", err2) + } } } } diff --git a/compute/hpc_backend_test.go b/compute/hpc_backend_test.go index 5b91abb3..30a11b6d 100644 --- a/compute/hpc_backend_test.go +++ b/compute/hpc_backend_test.go @@ -2,7 +2,7 @@ package compute import ( "fmt" - "io/ioutil" + "os" "testing" "github.com/ohsu-comp-bio/funnel/config" @@ -10,7 +10,7 @@ import ( ) func TestSetupTemplatedHPCSubmit(t *testing.T) { - tmp, err := ioutil.TempDir("", "funnel-test-scheduler") + tmp, err := os.MkdirTemp("", "funnel-test-scheduler") if err != nil { t.Fatal(err) } @@ -63,7 +63,7 @@ funnel worker run --taskID {{.TaskId}} t.Fatal(err) } - actual, rerr := ioutil.ReadFile(sf) + actual, rerr := os.ReadFile(sf) if rerr != nil { t.Fatal(rerr) } diff --git a/compute/htcondor/backend.go b/compute/htcondor/backend.go index 19d19345..9bb4778f 100644 --- a/compute/htcondor/backend.go +++ b/compute/htcondor/backend.go @@ -5,7 +5,7 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" + "os" "os/exec" "regexp" "strings" @@ -21,7 +21,7 @@ import ( // NewBackend returns a new HTCondor backend instance. func NewBackend(ctx context.Context, conf config.Config, reader tes.ReadOnlyServer, writer events.Writer, log *logger.Logger) (*compute.HPCBackend, error) { if conf.HTCondor.TemplateFile != "" { - content, err := ioutil.ReadFile(conf.HTCondor.TemplateFile) + content, err := os.ReadFile(conf.HTCondor.TemplateFile) if err != nil { return nil, fmt.Errorf("reading template: %v", err) } diff --git a/compute/kubernetes/backend.go b/compute/kubernetes/backend.go index 8ec259d3..f9506ea9 100644 --- a/compute/kubernetes/backend.go +++ b/compute/kubernetes/backend.go @@ -6,7 +6,7 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" + "os" "text/template" "time" @@ -27,7 +27,7 @@ import ( // NewBackend returns a new local Backend instance. func NewBackend(ctx context.Context, conf config.Kubernetes, reader tes.ReadOnlyServer, writer events.Writer, log *logger.Logger) (*Backend, error) { if conf.TemplateFile != "" { - content, err := ioutil.ReadFile(conf.TemplateFile) + content, err := os.ReadFile(conf.TemplateFile) if err != nil { return nil, fmt.Errorf("reading template: %v", err) } @@ -215,7 +215,7 @@ ReconcileLoop: case <-ctx.Done(): return case <-ticker.C: - jobs, err := b.client.List(context.TODO() ,metav1.ListOptions{}) + jobs, err := b.client.List(context.TODO(), metav1.ListOptions{}) if err != nil { b.log.Error("reconcile: listing jobs", err) continue ReconcileLoop @@ -239,15 +239,21 @@ ReconcileLoop: if err != nil { b.log.Error("reconcile: marshal failed job conditions", "taskID", j.Name, "error", err) } - b.event.WriteEvent(ctx, events.NewState(j.Name, tes.SystemError)) - b.event.WriteEvent( - ctx, - events.NewSystemLog( - j.Name, 0, 0, "error", - "Kubernetes job in FAILED state", - map[string]string{"error": string(conds)}, - ), + + if err2 := b.event.WriteEvent(ctx, events.NewState(j.Name, tes.SystemError)); err2 != nil { + b.log.Error("Detected error while writing SystemError event", err2) + } + + sl := events.NewSystemLog( + j.Name, 0, 0, "error", + "Kubernetes job in FAILED state", + map[string]string{"error": string(conds)}, ) + + if err2 := b.event.WriteEvent(ctx, sl); err2 != nil { + b.log.Error("Detected error while writing SystemLog event", err2) + } + if disableCleanup { continue ReconcileLoop } diff --git a/compute/kubernetes/backend_test.go b/compute/kubernetes/backend_test.go index 313247ea..96fed772 100644 --- a/compute/kubernetes/backend_test.go +++ b/compute/kubernetes/backend_test.go @@ -2,7 +2,7 @@ package kubernetes import ( "fmt" - "io/ioutil" + "os" "testing" "github.com/ohsu-comp-bio/funnel/config" @@ -12,7 +12,7 @@ import ( func TestCreateJobc(t *testing.T) { conf := config.DefaultConfig().Kubernetes - content, err := ioutil.ReadFile("../../config/kubernetes-template.yaml") + content, err := os.ReadFile("../../config/kubernetes-template.yaml") if err != nil { t.Fatal(fmt.Errorf("reading template: %v", err)) } diff --git a/compute/local/backend.go b/compute/local/backend.go index 6b9e1ac1..fc8a2472 100644 --- a/compute/local/backend.go +++ b/compute/local/backend.go @@ -3,6 +3,7 @@ package local import ( "context" + "fmt" workerCmd "github.com/ohsu-comp-bio/funnel/cmd/worker" "github.com/ohsu-comp-bio/funnel/config" @@ -47,7 +48,9 @@ func (b *Backend) Submit(task *tes.Task) error { } go func() { - w.Run(ctx) + if err := w.Run(ctx); err != nil { + fmt.Printf("Detected error while submitting a task: %s\n", err) + } w.Close() }() return nil diff --git a/compute/pbs/backend.go b/compute/pbs/backend.go index 16c36150..d1d15db6 100644 --- a/compute/pbs/backend.go +++ b/compute/pbs/backend.go @@ -5,7 +5,7 @@ import ( "context" "encoding/xml" "fmt" - "io/ioutil" + "os" "os/exec" "time" @@ -19,7 +19,7 @@ import ( // NewBackend returns a new PBS (Portable Batch System) HPCBackend instance. func NewBackend(ctx context.Context, conf config.Config, reader tes.ReadOnlyServer, writer events.Writer, log *logger.Logger) (*compute.HPCBackend, error) { if conf.PBS.TemplateFile != "" { - content, err := ioutil.ReadFile(conf.PBS.TemplateFile) + content, err := os.ReadFile(conf.PBS.TemplateFile) if err != nil { return nil, fmt.Errorf("reading template: %v", err) } diff --git a/compute/scheduler/node.go b/compute/scheduler/node.go index bd2ec874..b174f89d 100644 --- a/compute/scheduler/node.go +++ b/compute/scheduler/node.go @@ -2,6 +2,7 @@ package scheduler import ( "context" + "fmt" "os" "time" @@ -55,7 +56,7 @@ type NodeProcess struct { conf config.Config client Client log *logger.Logger - resources Resources + resources *Resources workerRun Worker workers *runSet timeout util.IdleTimeout @@ -98,7 +99,10 @@ func (n *NodeProcess) Run(ctx context.Context) { n.client.Close() // The workers get 10 seconds to finish up. - n.workers.Wait(time.Second * 10) + if err := n.workers.Wait(time.Second * 10); err != nil { + fmt.Printf("Detected error while waiting for works to finish "+ + "within 10 seconds: %s\n", err) + } return case <-ticker.C: @@ -112,12 +116,11 @@ func (n *NodeProcess) Run(ctx context.Context) { func (n *NodeProcess) checkConnection(ctx context.Context) { _, err := n.client.GetNode(ctx, &GetNodeRequest{Id: n.conf.Node.ID}) - // If its a 404 error create a new node s, _ := status.FromError(err) - if s.Code() != codes.NotFound { - n.log.Error("Couldn't contact server.", err) - } else { + if s.Code() == codes.OK { n.log.Info("Successfully connected to server.") + } else { + n.log.Error("Couldn't contact server: code="+s.Code().String(), err) } } @@ -125,7 +128,8 @@ func (n *NodeProcess) checkConnection(ctx context.Context) { // handles signals from the server (new task, cancel task, etc), reports resources, etc. // // TODO Sync should probably use a channel to sync data access. -// Probably only a problem for test code, where Sync is called directly. +// +// Probably only a problem for test code, where Sync is called directly. func (n *NodeProcess) sync(ctx context.Context) { var r *Node var err error @@ -135,7 +139,7 @@ func (n *NodeProcess) sync(ctx context.Context) { // If its a 404 error create a new node s, _ := status.FromError(err) if s.Code() != codes.NotFound { - n.log.Error("Couldn't get node state during sync.", err) + n.log.Error("Couldn't get node state during sync: code="+s.Code().String(), err) return } n.log.Info("Starting initial node sync") @@ -169,7 +173,7 @@ func (n *NodeProcess) sync(ctx context.Context) { _, err = n.client.PutNode(context.Background(), &Node{ Id: n.conf.Node.ID, - Resources: &n.resources, + Resources: n.resources, State: n.state, Version: r.GetVersion(), Metadata: meta, diff --git a/compute/scheduler/node_test.go b/compute/scheduler/node_test.go index 94efdbe3..354e3cbc 100644 --- a/compute/scheduler/node_test.go +++ b/compute/scheduler/node_test.go @@ -14,19 +14,32 @@ import ( func TestStopNode(t *testing.T) { conf := config.DefaultConfig() conf.Node.UpdateRate = config.Duration(time.Millisecond * 2) - n := newTestNode(conf, t) + + n := newTestNode(conf) n.Client.On("GetNode", mock.Anything, mock.Anything, mock.Anything). Return(&Node{}, nil) - stop := n.Start() - - // Fail if this test doesn't complete in the given time. - cleanup := timeLimit(t, time.Millisecond*100) - defer cleanup() - stop() - n.Wait() - n.Client.AssertCalled(t, "Close") + // Start the node: + cancel := n.Start() + + finished := make(chan bool) + + // In the background: stop the node and wait, it will report when done + go func() { + cancel() + n.Wait() + finished <- true + }() + + // Fail if this test doesn't complete in given time. + select { + case <-finished: + n.Client.AssertCalled(t, "Close") + t.Log("Node finished before test-timeout") + case <-time.After(time.Millisecond * 100): + t.Fatal("Node took more time to finish than permitted (100ms)") + } } // Mainly exercising a panic bug caused by an unhandled @@ -34,7 +47,7 @@ func TestStopNode(t *testing.T) { func TestGetNodeFail(t *testing.T) { conf := config.DefaultConfig() conf.Node.UpdateRate = config.Duration(time.Millisecond * 2) - n := newTestNode(conf, t) + n := newTestNode(conf) // Set GetNode to return an error n.Client.On("GetNode", mock.Anything, mock.Anything, mock.Anything). @@ -49,7 +62,7 @@ func TestNodeTimeout(t *testing.T) { conf.Node.Timeout = config.Duration(time.Millisecond) conf.Node.UpdateRate = config.Duration(time.Millisecond * 2) - n := newTestNode(conf, t) + n := newTestNode(conf) // Set up a test worker which this code can easily control. //w := testWorker{} @@ -62,18 +75,28 @@ func TestNodeTimeout(t *testing.T) { n.Start() // Fail if this test doesn't complete in the given time. - cleanup := timeLimit(t, time.Duration(conf.Node.Timeout*500)) - defer cleanup() - - // Wait for the node to exit - n.Wait() + finished := make(chan bool) + + // In the background: wait for the node to exit, it will report when done + go func() { + n.Wait() + finished <- true + }() + + // Fail if this test doesn't complete in given time. + select { + case <-finished: + t.Log("Node completed before test-timeout") + case <-time.After(time.Duration(conf.Node.Timeout * 500)): + t.Fatal("Node took more time (5ms) than permitted with timeout (1ms)") + } } // Test that a node does nothing where there are no assigned tasks. func TestNoTasks(t *testing.T) { conf := config.DefaultConfig() conf.Node.UpdateRate = config.Duration(time.Millisecond * 2) - n := newTestNode(conf, t) + n := newTestNode(conf) // Tell the scheduler mock to return nothing n.Client.On("GetNode", mock.Anything, mock.Anything, mock.Anything). @@ -103,7 +126,7 @@ func TestNoTasks(t *testing.T) { func TestNodeWorkerCreated(t *testing.T) { conf := config.DefaultConfig() conf.Node.UpdateRate = config.Duration(time.Millisecond * 2) - n := newTestNode(conf, t) + n := newTestNode(conf) // Count the number of times the worker factory was called var count int @@ -126,7 +149,7 @@ func TestNodeWorkerCreated(t *testing.T) { func TestFinishedTaskNotRerun(t *testing.T) { conf := config.DefaultConfig() conf.Node.UpdateRate = config.Duration(time.Millisecond * 2) - n := newTestNode(conf, t) + n := newTestNode(conf) // Set up a test worker which this code can easily control. //w := testWorker{} @@ -158,7 +181,7 @@ func TestFinishedTaskNotRerun(t *testing.T) { func TestFinishedTaskRunsetCount(t *testing.T) { conf := config.DefaultConfig() conf.Node.UpdateRate = config.Duration(time.Millisecond * 2) - n := newTestNode(conf, t) + n := newTestNode(conf) // Set up a test worker which this code can easily control. //w := testWorker{} diff --git a/compute/scheduler/node_util.go b/compute/scheduler/node_util.go index 46de0cd6..dbc22679 100644 --- a/compute/scheduler/node_util.go +++ b/compute/scheduler/node_util.go @@ -67,7 +67,7 @@ func SubtractResources(t *tes.Task, in *Resources) *Resources { out.DiskGb -= tres.GetDiskGb() // Check minimum values. - if out.Cpus < 0 { + if out.Cpus < 1 { out.Cpus = 0 } if out.RamGb < 0.0 { diff --git a/compute/scheduler/predicates_test.go b/compute/scheduler/predicates_test.go index 8d3a34f1..a7dea5e5 100644 --- a/compute/scheduler/predicates_test.go +++ b/compute/scheduler/predicates_test.go @@ -64,6 +64,21 @@ func testEmptyTask(t *testing.T, p Predicate, name string) { }() j := &tes.Task{} - w := &Node{} - p(j, w) + w := &Node{ + Id: "test-node", + Resources: &Resources{ + Cpus: 1.0, + RamGb: 1.0, + DiskGb: 1.0, + }, + Available: &Resources{ + Cpus: 1.0, + RamGb: 1.0, + DiskGb: 1.0, + }, + } + + if err := p(j, w); err != nil { + t.Error(err) + } } diff --git a/compute/scheduler/scheduler.go b/compute/scheduler/scheduler.go index 2d9d9319..eb39138d 100644 --- a/compute/scheduler/scheduler.go +++ b/compute/scheduler/scheduler.go @@ -63,11 +63,20 @@ func (s *Scheduler) CheckNodes() error { if node.State == NodeState_GONE { for _, tid := range node.TaskIds { - s.Event.WriteEvent(ctx, events.NewState(tid, tes.State_SYSTEM_ERROR)) - s.Event.WriteEvent(ctx, events.NewSystemLog(tid, 0, 0, "info", - "Cleaning up Task assigned to dead/gone node", map[string]string{ + if err2 := s.Event.WriteEvent(ctx, events.NewState(tid, tes.State_SYSTEM_ERROR)); err2 != nil { + s.Log.Error("Detected error while writing SystemError event", err2) + } + + sl := events.NewSystemLog(tid, 0, 0, "info", + "Cleaning up Task assigned to dead/gone node", + map[string]string{ "nodeID": node.Id, - })) + }, + ) + + if err2 := s.Event.WriteEvent(ctx, sl); err2 != nil { + s.Log.Error("Detected error while writing SystemLog event", err2) + } } _, err = s.Nodes.DeleteNode(ctx, node) } else { @@ -100,10 +109,15 @@ func (s *Scheduler) Schedule(ctx context.Context) error { "nodeID", offer.Node.Id, "node", offer.Node, ) - s.Event.WriteEvent(ctx, events.NewSystemLog(task.Id, 0, 0, "info", + err = s.Event.WriteEvent(ctx, events.NewSystemLog(task.Id, 0, 0, "info", "Assigning task to node", map[string]string{ "nodeID": offer.Node.Id, })) + s.Log.Error("Error in AssignTask", + "error", err, + "taskID", task.Id, + "nodeID", offer.Node.Id, + ) // TODO this is important! write a test for this line. // when a task is assigned, its state is immediately Initializing @@ -116,11 +130,17 @@ func (s *Scheduler) Schedule(ctx context.Context) error { "taskID", task.Id, "nodeID", offer.Node.Id, ) - s.Event.WriteEvent(ctx, events.NewSystemLog(task.Id, 0, 0, "error", + + sl := events.NewSystemLog(task.Id, 0, 0, "error", "Error in AssignTask", map[string]string{ "error": err.Error(), "nodeID": offer.Node.Id, - })) + }, + ) + + if err2 := s.Event.WriteEvent(ctx, sl); err2 != nil { + s.Log.Error("Detected error while writing SystemLog event", err2) + } continue } diff --git a/compute/scheduler/scheduler.pb.go b/compute/scheduler/scheduler.pb.go index 389f5a33..4672d27d 100644 --- a/compute/scheduler/scheduler.pb.go +++ b/compute/scheduler/scheduler.pb.go @@ -1,43 +1,25 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: scheduler.proto - -/* -Package scheduler is a generated protocol buffer package. - -It is generated from these files: - scheduler.proto - -It has these top-level messages: - Resources - Node - GetNodeRequest - ListNodesRequest - ListNodesResponse - PutNodeResponse - DeleteNodeResponse -*/ -package scheduler +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.3 +// source: compute/scheduler/scheduler.proto -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "google.golang.org/genproto/googleapis/api/annotations" +package scheduler import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type NodeState int32 @@ -50,439 +32,690 @@ const ( NodeState_DRAIN NodeState = 5 ) -var NodeState_name = map[int32]string{ - 0: "UNINITIALIZED", - 1: "ALIVE", - 2: "DEAD", - 3: "GONE", - 4: "INITIALIZING", - 5: "DRAIN", -} -var NodeState_value = map[string]int32{ - "UNINITIALIZED": 0, - "ALIVE": 1, - "DEAD": 2, - "GONE": 3, - "INITIALIZING": 4, - "DRAIN": 5, +// Enum value maps for NodeState. +var ( + NodeState_name = map[int32]string{ + 0: "UNINITIALIZED", + 1: "ALIVE", + 2: "DEAD", + 3: "GONE", + 4: "INITIALIZING", + 5: "DRAIN", + } + NodeState_value = map[string]int32{ + "UNINITIALIZED": 0, + "ALIVE": 1, + "DEAD": 2, + "GONE": 3, + "INITIALIZING": 4, + "DRAIN": 5, + } +) + +func (x NodeState) Enum() *NodeState { + p := new(NodeState) + *p = x + return p } func (x NodeState) String() string { - return proto.EnumName(NodeState_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NodeState) Descriptor() protoreflect.EnumDescriptor { + return file_compute_scheduler_scheduler_proto_enumTypes[0].Descriptor() +} + +func (NodeState) Type() protoreflect.EnumType { + return &file_compute_scheduler_scheduler_proto_enumTypes[0] +} + +func (x NodeState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NodeState.Descriptor instead. +func (NodeState) EnumDescriptor() ([]byte, []int) { + return file_compute_scheduler_scheduler_proto_rawDescGZIP(), []int{0} } -func (NodeState) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } type Resources struct { - Cpus uint32 `protobuf:"varint,1,opt,name=cpus" json:"cpus,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cpus uint32 `protobuf:"varint,1,opt,name=cpus,proto3" json:"cpus,omitempty"` // In GB - RamGb float64 `protobuf:"fixed64,2,opt,name=ram_gb,json=ramGb" json:"ram_gb,omitempty"` + RamGb float64 `protobuf:"fixed64,2,opt,name=ram_gb,json=ramGb,proto3" json:"ram_gb,omitempty"` // In GB - DiskGb float64 `protobuf:"fixed64,3,opt,name=disk_gb,json=diskGb" json:"disk_gb,omitempty"` + DiskGb float64 `protobuf:"fixed64,3,opt,name=disk_gb,json=diskGb,proto3" json:"disk_gb,omitempty"` } -func (m *Resources) Reset() { *m = Resources{} } -func (m *Resources) String() string { return proto.CompactTextString(m) } -func (*Resources) ProtoMessage() {} -func (*Resources) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (x *Resources) Reset() { + *x = Resources{} + if protoimpl.UnsafeEnabled { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Resources) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *Resources) GetCpus() uint32 { - if m != nil { - return m.Cpus +func (*Resources) ProtoMessage() {} + +func (x *Resources) ProtoReflect() protoreflect.Message { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Resources.ProtoReflect.Descriptor instead. +func (*Resources) Descriptor() ([]byte, []int) { + return file_compute_scheduler_scheduler_proto_rawDescGZIP(), []int{0} +} + +func (x *Resources) GetCpus() uint32 { + if x != nil { + return x.Cpus } return 0 } -func (m *Resources) GetRamGb() float64 { - if m != nil { - return m.RamGb +func (x *Resources) GetRamGb() float64 { + if x != nil { + return x.RamGb } return 0 } -func (m *Resources) GetDiskGb() float64 { - if m != nil { - return m.DiskGb +func (x *Resources) GetDiskGb() float64 { + if x != nil { + return x.DiskGb } return 0 } type Node struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Resources *Resources `protobuf:"bytes,5,opt,name=resources" json:"resources,omitempty"` - Available *Resources `protobuf:"bytes,6,opt,name=available" json:"available,omitempty"` - State NodeState `protobuf:"varint,8,opt,name=state,enum=scheduler.NodeState" json:"state,omitempty"` - Preemptible bool `protobuf:"varint,9,opt,name=preemptible" json:"preemptible,omitempty"` - Zone string `protobuf:"bytes,11,opt,name=zone" json:"zone,omitempty"` - Hostname string `protobuf:"bytes,13,opt,name=hostname" json:"hostname,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Resources *Resources `protobuf:"bytes,5,opt,name=resources,proto3" json:"resources,omitempty"` + Available *Resources `protobuf:"bytes,6,opt,name=available,proto3" json:"available,omitempty"` + State NodeState `protobuf:"varint,8,opt,name=state,proto3,enum=scheduler.NodeState" json:"state,omitempty"` + Preemptible bool `protobuf:"varint,9,opt,name=preemptible,proto3" json:"preemptible,omitempty"` + Zone string `protobuf:"bytes,11,opt,name=zone,proto3" json:"zone,omitempty"` + Hostname string `protobuf:"bytes,13,opt,name=hostname,proto3" json:"hostname,omitempty"` // Timestamp version of the record in the database. Used to prevent write conflicts and as the last ping time. - Version int64 `protobuf:"varint,14,opt,name=version" json:"version,omitempty"` - Metadata map[string]string `protobuf:"bytes,15,rep,name=metadata" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - TaskIds []string `protobuf:"bytes,16,rep,name=task_ids,json=taskIds" json:"task_ids,omitempty"` - LastPing int64 `protobuf:"varint,17,opt,name=last_ping,json=lastPing" json:"last_ping,omitempty"` + Version int64 `protobuf:"varint,14,opt,name=version,proto3" json:"version,omitempty"` + Metadata map[string]string `protobuf:"bytes,15,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TaskIds []string `protobuf:"bytes,16,rep,name=task_ids,json=taskIds,proto3" json:"task_ids,omitempty"` + LastPing int64 `protobuf:"varint,17,opt,name=last_ping,json=lastPing,proto3" json:"last_ping,omitempty"` +} + +func (x *Node) Reset() { + *x = Node{} + if protoimpl.UnsafeEnabled { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Node) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Node) Reset() { *m = Node{} } -func (m *Node) String() string { return proto.CompactTextString(m) } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (*Node) ProtoMessage() {} -func (m *Node) GetId() string { - if m != nil { - return m.Id +func (x *Node) ProtoReflect() protoreflect.Message { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Node.ProtoReflect.Descriptor instead. +func (*Node) Descriptor() ([]byte, []int) { + return file_compute_scheduler_scheduler_proto_rawDescGZIP(), []int{1} +} + +func (x *Node) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *Node) GetResources() *Resources { - if m != nil { - return m.Resources +func (x *Node) GetResources() *Resources { + if x != nil { + return x.Resources } return nil } -func (m *Node) GetAvailable() *Resources { - if m != nil { - return m.Available +func (x *Node) GetAvailable() *Resources { + if x != nil { + return x.Available } return nil } -func (m *Node) GetState() NodeState { - if m != nil { - return m.State +func (x *Node) GetState() NodeState { + if x != nil { + return x.State } return NodeState_UNINITIALIZED } -func (m *Node) GetPreemptible() bool { - if m != nil { - return m.Preemptible +func (x *Node) GetPreemptible() bool { + if x != nil { + return x.Preemptible } return false } -func (m *Node) GetZone() string { - if m != nil { - return m.Zone +func (x *Node) GetZone() string { + if x != nil { + return x.Zone } return "" } -func (m *Node) GetHostname() string { - if m != nil { - return m.Hostname +func (x *Node) GetHostname() string { + if x != nil { + return x.Hostname } return "" } -func (m *Node) GetVersion() int64 { - if m != nil { - return m.Version +func (x *Node) GetVersion() int64 { + if x != nil { + return x.Version } return 0 } -func (m *Node) GetMetadata() map[string]string { - if m != nil { - return m.Metadata +func (x *Node) GetMetadata() map[string]string { + if x != nil { + return x.Metadata } return nil } -func (m *Node) GetTaskIds() []string { - if m != nil { - return m.TaskIds +func (x *Node) GetTaskIds() []string { + if x != nil { + return x.TaskIds } return nil } -func (m *Node) GetLastPing() int64 { - if m != nil { - return m.LastPing +func (x *Node) GetLastPing() int64 { + if x != nil { + return x.LastPing } return 0 } type GetNodeRequest struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetNodeRequest) Reset() { *m = GetNodeRequest{} } -func (m *GetNodeRequest) String() string { return proto.CompactTextString(m) } -func (*GetNodeRequest) ProtoMessage() {} -func (*GetNodeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} -func (m *GetNodeRequest) GetId() string { - if m != nil { - return m.Id +func (x *GetNodeRequest) Reset() { + *x = GetNodeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type ListNodesRequest struct { +func (x *GetNodeRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListNodesRequest) Reset() { *m = ListNodesRequest{} } -func (m *ListNodesRequest) String() string { return proto.CompactTextString(m) } -func (*ListNodesRequest) ProtoMessage() {} -func (*ListNodesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (*GetNodeRequest) ProtoMessage() {} -type ListNodesResponse struct { - Nodes []*Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"` +func (x *GetNodeRequest) ProtoReflect() protoreflect.Message { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ListNodesResponse) Reset() { *m = ListNodesResponse{} } -func (m *ListNodesResponse) String() string { return proto.CompactTextString(m) } -func (*ListNodesResponse) ProtoMessage() {} -func (*ListNodesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +// Deprecated: Use GetNodeRequest.ProtoReflect.Descriptor instead. +func (*GetNodeRequest) Descriptor() ([]byte, []int) { + return file_compute_scheduler_scheduler_proto_rawDescGZIP(), []int{2} +} -func (m *ListNodesResponse) GetNodes() []*Node { - if m != nil { - return m.Nodes +func (x *GetNodeRequest) GetId() string { + if x != nil { + return x.Id } - return nil + return "" } -type PutNodeResponse struct { +type ListNodesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *PutNodeResponse) Reset() { *m = PutNodeResponse{} } -func (m *PutNodeResponse) String() string { return proto.CompactTextString(m) } -func (*PutNodeResponse) ProtoMessage() {} -func (*PutNodeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -type DeleteNodeResponse struct { +func (x *ListNodesRequest) Reset() { + *x = ListNodesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DeleteNodeResponse) Reset() { *m = DeleteNodeResponse{} } -func (m *DeleteNodeResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteNodeResponse) ProtoMessage() {} -func (*DeleteNodeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -func init() { - proto.RegisterType((*Resources)(nil), "scheduler.Resources") - proto.RegisterType((*Node)(nil), "scheduler.Node") - proto.RegisterType((*GetNodeRequest)(nil), "scheduler.GetNodeRequest") - proto.RegisterType((*ListNodesRequest)(nil), "scheduler.ListNodesRequest") - proto.RegisterType((*ListNodesResponse)(nil), "scheduler.ListNodesResponse") - proto.RegisterType((*PutNodeResponse)(nil), "scheduler.PutNodeResponse") - proto.RegisterType((*DeleteNodeResponse)(nil), "scheduler.DeleteNodeResponse") - proto.RegisterEnum("scheduler.NodeState", NodeState_name, NodeState_value) +func (x *ListNodesRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +func (*ListNodesRequest) ProtoMessage() {} -// Client API for SchedulerService service - -type SchedulerServiceClient interface { - PutNode(ctx context.Context, in *Node, opts ...grpc.CallOption) (*PutNodeResponse, error) - DeleteNode(ctx context.Context, in *Node, opts ...grpc.CallOption) (*DeleteNodeResponse, error) - ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) - GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*Node, error) +func (x *ListNodesRequest) ProtoReflect() protoreflect.Message { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type schedulerServiceClient struct { - cc *grpc.ClientConn +// Deprecated: Use ListNodesRequest.ProtoReflect.Descriptor instead. +func (*ListNodesRequest) Descriptor() ([]byte, []int) { + return file_compute_scheduler_scheduler_proto_rawDescGZIP(), []int{3} } -func NewSchedulerServiceClient(cc *grpc.ClientConn) SchedulerServiceClient { - return &schedulerServiceClient{cc} -} +type ListNodesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (c *schedulerServiceClient) PutNode(ctx context.Context, in *Node, opts ...grpc.CallOption) (*PutNodeResponse, error) { - out := new(PutNodeResponse) - err := grpc.Invoke(ctx, "/scheduler.SchedulerService/PutNode", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil + Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` } -func (c *schedulerServiceClient) DeleteNode(ctx context.Context, in *Node, opts ...grpc.CallOption) (*DeleteNodeResponse, error) { - out := new(DeleteNodeResponse) - err := grpc.Invoke(ctx, "/scheduler.SchedulerService/DeleteNode", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *ListNodesResponse) Reset() { + *x = ListNodesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return out, nil } -func (c *schedulerServiceClient) ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) { - out := new(ListNodesResponse) - err := grpc.Invoke(ctx, "/scheduler.SchedulerService/ListNodes", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +func (x *ListNodesResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (c *schedulerServiceClient) GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*Node, error) { - out := new(Node) - err := grpc.Invoke(ctx, "/scheduler.SchedulerService/GetNode", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (*ListNodesResponse) ProtoMessage() {} + +func (x *ListNodesResponse) ProtoReflect() protoreflect.Message { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return out, nil + return mi.MessageOf(x) } -// Server API for SchedulerService service +// Deprecated: Use ListNodesResponse.ProtoReflect.Descriptor instead. +func (*ListNodesResponse) Descriptor() ([]byte, []int) { + return file_compute_scheduler_scheduler_proto_rawDescGZIP(), []int{4} +} -type SchedulerServiceServer interface { - PutNode(context.Context, *Node) (*PutNodeResponse, error) - DeleteNode(context.Context, *Node) (*DeleteNodeResponse, error) - ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) - GetNode(context.Context, *GetNodeRequest) (*Node, error) +func (x *ListNodesResponse) GetNodes() []*Node { + if x != nil { + return x.Nodes + } + return nil } -func RegisterSchedulerServiceServer(s *grpc.Server, srv SchedulerServiceServer) { - s.RegisterService(&_SchedulerService_serviceDesc, srv) +type PutNodeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func _SchedulerService_PutNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Node) - if err := dec(in); err != nil { - return nil, err +func (x *PutNodeResponse) Reset() { + *x = PutNodeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - if interceptor == nil { - return srv.(SchedulerServiceServer).PutNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/scheduler.SchedulerService/PutNode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SchedulerServiceServer).PutNode(ctx, req.(*Node)) - } - return interceptor(ctx, in, info, handler) } -func _SchedulerService_DeleteNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Node) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SchedulerServiceServer).DeleteNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/scheduler.SchedulerService/DeleteNode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SchedulerServiceServer).DeleteNode(ctx, req.(*Node)) - } - return interceptor(ctx, in, info, handler) +func (x *PutNodeResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func _SchedulerService_ListNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SchedulerServiceServer).ListNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/scheduler.SchedulerService/ListNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SchedulerServiceServer).ListNodes(ctx, req.(*ListNodesRequest)) +func (*PutNodeResponse) ProtoMessage() {} + +func (x *PutNodeResponse) ProtoReflect() protoreflect.Message { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return interceptor(ctx, in, info, handler) + return mi.MessageOf(x) } -func _SchedulerService_GetNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SchedulerServiceServer).GetNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/scheduler.SchedulerService/GetNode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SchedulerServiceServer).GetNode(ctx, req.(*GetNodeRequest)) - } - return interceptor(ctx, in, info, handler) +// Deprecated: Use PutNodeResponse.ProtoReflect.Descriptor instead. +func (*PutNodeResponse) Descriptor() ([]byte, []int) { + return file_compute_scheduler_scheduler_proto_rawDescGZIP(), []int{5} } -var _SchedulerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "scheduler.SchedulerService", - HandlerType: (*SchedulerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PutNode", - Handler: _SchedulerService_PutNode_Handler, - }, - { - MethodName: "DeleteNode", - Handler: _SchedulerService_DeleteNode_Handler, - }, - { - MethodName: "ListNodes", - Handler: _SchedulerService_ListNodes_Handler, - }, - { - MethodName: "GetNode", - Handler: _SchedulerService_GetNode_Handler, +type DeleteNodeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteNodeResponse) Reset() { + *x = DeleteNodeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNodeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNodeResponse) ProtoMessage() {} + +func (x *DeleteNodeResponse) ProtoReflect() protoreflect.Message { + mi := &file_compute_scheduler_scheduler_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNodeResponse.ProtoReflect.Descriptor instead. +func (*DeleteNodeResponse) Descriptor() ([]byte, []int) { + return file_compute_scheduler_scheduler_proto_rawDescGZIP(), []int{6} +} + +var File_compute_scheduler_scheduler_proto protoreflect.FileDescriptor + +var file_compute_scheduler_scheduler_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x09, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x70, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x70, 0x75, 0x73, 0x12, 0x15, 0x0a, + 0x06, 0x72, 0x61, 0x6d, 0x5f, 0x67, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x72, + 0x61, 0x6d, 0x47, 0x62, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x67, 0x62, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x64, 0x69, 0x73, 0x6b, 0x47, 0x62, 0x22, 0xc6, 0x03, + 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x52, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2a, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, + 0x65, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x10, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x69, 0x6e, 0x67, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x12, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x25, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x50, 0x75, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2a, 0x5a, 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, + 0x0a, 0x0d, 0x55, 0x4e, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, + 0x44, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x4f, 0x4e, 0x45, 0x10, 0x03, + 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, + 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x10, 0x05, 0x32, 0xb6, 0x02, + 0x0a, 0x10, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x50, 0x75, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x1a, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0a, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x1d, 0x2e, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x09, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x76, + 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x47, + 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0x16, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x68, 0x73, 0x75, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x2d, 0x62, + 0x69, 0x6f, 0x2f, 0x66, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_compute_scheduler_scheduler_proto_rawDescOnce sync.Once + file_compute_scheduler_scheduler_proto_rawDescData = file_compute_scheduler_scheduler_proto_rawDesc +) + +func file_compute_scheduler_scheduler_proto_rawDescGZIP() []byte { + file_compute_scheduler_scheduler_proto_rawDescOnce.Do(func() { + file_compute_scheduler_scheduler_proto_rawDescData = protoimpl.X.CompressGZIP(file_compute_scheduler_scheduler_proto_rawDescData) + }) + return file_compute_scheduler_scheduler_proto_rawDescData +} + +var file_compute_scheduler_scheduler_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_compute_scheduler_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_compute_scheduler_scheduler_proto_goTypes = []interface{}{ + (NodeState)(0), // 0: scheduler.NodeState + (*Resources)(nil), // 1: scheduler.Resources + (*Node)(nil), // 2: scheduler.Node + (*GetNodeRequest)(nil), // 3: scheduler.GetNodeRequest + (*ListNodesRequest)(nil), // 4: scheduler.ListNodesRequest + (*ListNodesResponse)(nil), // 5: scheduler.ListNodesResponse + (*PutNodeResponse)(nil), // 6: scheduler.PutNodeResponse + (*DeleteNodeResponse)(nil), // 7: scheduler.DeleteNodeResponse + nil, // 8: scheduler.Node.MetadataEntry +} +var file_compute_scheduler_scheduler_proto_depIdxs = []int32{ + 1, // 0: scheduler.Node.resources:type_name -> scheduler.Resources + 1, // 1: scheduler.Node.available:type_name -> scheduler.Resources + 0, // 2: scheduler.Node.state:type_name -> scheduler.NodeState + 8, // 3: scheduler.Node.metadata:type_name -> scheduler.Node.MetadataEntry + 2, // 4: scheduler.ListNodesResponse.nodes:type_name -> scheduler.Node + 2, // 5: scheduler.SchedulerService.PutNode:input_type -> scheduler.Node + 2, // 6: scheduler.SchedulerService.DeleteNode:input_type -> scheduler.Node + 4, // 7: scheduler.SchedulerService.ListNodes:input_type -> scheduler.ListNodesRequest + 3, // 8: scheduler.SchedulerService.GetNode:input_type -> scheduler.GetNodeRequest + 6, // 9: scheduler.SchedulerService.PutNode:output_type -> scheduler.PutNodeResponse + 7, // 10: scheduler.SchedulerService.DeleteNode:output_type -> scheduler.DeleteNodeResponse + 5, // 11: scheduler.SchedulerService.ListNodes:output_type -> scheduler.ListNodesResponse + 2, // 12: scheduler.SchedulerService.GetNode:output_type -> scheduler.Node + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_compute_scheduler_scheduler_proto_init() } +func file_compute_scheduler_scheduler_proto_init() { + if File_compute_scheduler_scheduler_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_compute_scheduler_scheduler_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resources); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_compute_scheduler_scheduler_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Node); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_compute_scheduler_scheduler_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNodeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_compute_scheduler_scheduler_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNodesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_compute_scheduler_scheduler_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNodesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_compute_scheduler_scheduler_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutNodeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_compute_scheduler_scheduler_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteNodeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_compute_scheduler_scheduler_proto_rawDesc, + NumEnums: 1, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "scheduler.proto", -} - -func init() { proto.RegisterFile("scheduler.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 633 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xdd, 0x6a, 0xdb, 0x4a, - 0x10, 0x8e, 0xfc, 0xaf, 0xf1, 0xb1, 0x2d, 0x0f, 0x39, 0xe7, 0x28, 0x4a, 0x0a, 0x42, 0x50, 0x10, - 0xb9, 0x88, 0xa9, 0x7b, 0x93, 0xa6, 0x50, 0x30, 0xd8, 0x18, 0x41, 0xe2, 0x84, 0x4d, 0x5b, 0x68, - 0x6e, 0xc2, 0xda, 0x5a, 0x9c, 0x25, 0xb2, 0xa4, 0x6a, 0xd7, 0x86, 0xb4, 0xf4, 0xa6, 0xaf, 0xd0, - 0x77, 0xe9, 0x23, 0xf4, 0x05, 0xfa, 0x0a, 0x7d, 0x90, 0xb2, 0xb2, 0xa2, 0x28, 0x4a, 0xe9, 0xdd, - 0xce, 0x37, 0xdf, 0xcc, 0x7c, 0x33, 0x9f, 0x10, 0xf4, 0xc4, 0xe2, 0x86, 0xf9, 0xeb, 0x80, 0x25, - 0x47, 0x71, 0x12, 0xc9, 0x08, 0xf5, 0x1c, 0xb0, 0x0e, 0x96, 0x51, 0xb4, 0x0c, 0xd8, 0x80, 0xc6, - 0x7c, 0x40, 0xc3, 0x30, 0x92, 0x54, 0xf2, 0x28, 0x14, 0x5b, 0xa2, 0x73, 0x0e, 0x3a, 0x61, 0x22, - 0x5a, 0x27, 0x0b, 0x26, 0x10, 0xa1, 0xb6, 0x88, 0xd7, 0xc2, 0xd4, 0x6c, 0xcd, 0xed, 0x90, 0xf4, - 0x8d, 0xff, 0x42, 0x23, 0xa1, 0xab, 0xeb, 0xe5, 0xdc, 0xac, 0xd8, 0x9a, 0xab, 0x91, 0x7a, 0x42, - 0x57, 0xd3, 0x39, 0xfe, 0x0f, 0x4d, 0x9f, 0x8b, 0x5b, 0x85, 0x57, 0x53, 0xbc, 0xa1, 0xc2, 0xe9, - 0xdc, 0xf9, 0x51, 0x85, 0xda, 0x2c, 0xf2, 0x19, 0x76, 0xa1, 0xc2, 0xfd, 0xb4, 0x95, 0x4e, 0x2a, - 0xdc, 0xc7, 0x21, 0xe8, 0xc9, 0xfd, 0x24, 0xb3, 0x6e, 0x6b, 0x6e, 0x7b, 0xb8, 0x7b, 0xf4, 0xa0, - 0x3b, 0x57, 0x41, 0x1e, 0x68, 0xaa, 0x86, 0x6e, 0x28, 0x0f, 0xe8, 0x3c, 0x60, 0x66, 0xe3, 0x6f, - 0x35, 0x39, 0x0d, 0x0f, 0xa1, 0x2e, 0x24, 0x95, 0xcc, 0x6c, 0xd9, 0x9a, 0xdb, 0x7d, 0xc4, 0x57, - 0xba, 0x2e, 0x55, 0x8e, 0x6c, 0x29, 0x68, 0x43, 0x3b, 0x4e, 0x18, 0x5b, 0xc5, 0x92, 0xab, 0x09, - 0xba, 0xad, 0xb9, 0x2d, 0x52, 0x84, 0xd4, 0x49, 0x3e, 0x45, 0x21, 0x33, 0xdb, 0xe9, 0x1e, 0xe9, - 0x1b, 0x2d, 0x68, 0xdd, 0x44, 0x42, 0x86, 0x74, 0xc5, 0xcc, 0x4e, 0x8a, 0xe7, 0x31, 0x9a, 0xd0, - 0xdc, 0xb0, 0x44, 0xf0, 0x28, 0x34, 0xbb, 0xb6, 0xe6, 0x56, 0xc9, 0x7d, 0x88, 0xaf, 0xa0, 0xb5, - 0x62, 0x92, 0xfa, 0x54, 0x52, 0xb3, 0x67, 0x57, 0xdd, 0xf6, 0xf0, 0x59, 0x49, 0xda, 0xd1, 0x59, - 0x96, 0x9f, 0x84, 0x32, 0xb9, 0x23, 0x39, 0x1d, 0xf7, 0xa0, 0x25, 0xa9, 0xb8, 0xbd, 0xe6, 0xbe, - 0x30, 0x0d, 0xbb, 0xea, 0xea, 0xa4, 0xa9, 0x62, 0xcf, 0x17, 0xb8, 0x0f, 0x7a, 0x40, 0x85, 0xbc, - 0x8e, 0x79, 0xb8, 0x34, 0xfb, 0xe9, 0xc4, 0x96, 0x02, 0x2e, 0x78, 0xb8, 0xb4, 0x5e, 0x43, 0xe7, - 0x51, 0x4b, 0x34, 0xa0, 0x7a, 0xcb, 0xee, 0x32, 0x53, 0xd4, 0x13, 0x77, 0xa1, 0xbe, 0xa1, 0xc1, - 0x9a, 0xa5, 0xee, 0xea, 0x64, 0x1b, 0x9c, 0x54, 0x8e, 0x35, 0xc7, 0x86, 0xee, 0x94, 0x49, 0xa5, - 0x8b, 0xb0, 0x8f, 0x6b, 0x26, 0x64, 0xd9, 0x51, 0x07, 0xc1, 0x38, 0xe5, 0x22, 0xa5, 0x88, 0x8c, - 0xe3, 0x9c, 0x40, 0xbf, 0x80, 0x89, 0x38, 0x0a, 0x05, 0xc3, 0xe7, 0x50, 0x0f, 0x15, 0x60, 0x6a, - 0xe9, 0xde, 0xbd, 0xd2, 0xde, 0x64, 0x9b, 0x75, 0xfa, 0xd0, 0xbb, 0x58, 0x67, 0x13, 0xb7, 0x95, - 0xce, 0x2e, 0xe0, 0x98, 0x05, 0x4c, 0xb2, 0x22, 0x7a, 0x78, 0x05, 0x7a, 0x6e, 0x25, 0xf6, 0xa1, - 0xf3, 0x6e, 0xe6, 0xcd, 0xbc, 0xb7, 0xde, 0xe8, 0xd4, 0xbb, 0x9a, 0x8c, 0x8d, 0x1d, 0xd4, 0xa1, - 0x3e, 0x3a, 0xf5, 0xde, 0x4f, 0x0c, 0x0d, 0x5b, 0x50, 0x1b, 0x4f, 0x46, 0x63, 0xa3, 0xa2, 0x5e, - 0xd3, 0xf3, 0xd9, 0xc4, 0xa8, 0xa2, 0x01, 0xff, 0xe4, 0x7c, 0x6f, 0x36, 0x35, 0x6a, 0xaa, 0x60, - 0x4c, 0x46, 0xde, 0xcc, 0xa8, 0x0f, 0xbf, 0x57, 0xc0, 0xb8, 0xbc, 0x97, 0x77, 0xc9, 0x92, 0x0d, - 0x5f, 0x30, 0x3c, 0x86, 0x66, 0xa6, 0x0c, 0xcb, 0xe2, 0x2d, 0xab, 0x00, 0x94, 0xe5, 0xef, 0xe0, - 0x1b, 0x80, 0x87, 0x05, 0x9e, 0x16, 0x17, 0x3f, 0x81, 0xa7, 0x8b, 0x3a, 0x3b, 0xf8, 0x01, 0xf4, - 0xfc, 0x9e, 0xb8, 0x5f, 0x60, 0x97, 0x2f, 0x6f, 0x1d, 0xfc, 0x39, 0x99, 0x75, 0xea, 0x7f, 0xfd, - 0xf9, 0xeb, 0x5b, 0xa5, 0x8d, 0xfa, 0x60, 0xf3, 0x62, 0x90, 0x9e, 0x1b, 0xcf, 0xa0, 0x99, 0x19, - 0x8c, 0x7b, 0x85, 0xda, 0xc7, 0xa6, 0x5b, 0x65, 0xc9, 0xce, 0x7f, 0x69, 0x27, 0x03, 0xbb, 0x79, - 0xa7, 0xc1, 0x67, 0xee, 0x7f, 0x99, 0x37, 0xd2, 0x1f, 0xca, 0xcb, 0xdf, 0x01, 0x00, 0x00, 0xff, - 0xff, 0xdb, 0x64, 0x56, 0xb7, 0x8c, 0x04, 0x00, 0x00, + GoTypes: file_compute_scheduler_scheduler_proto_goTypes, + DependencyIndexes: file_compute_scheduler_scheduler_proto_depIdxs, + EnumInfos: file_compute_scheduler_scheduler_proto_enumTypes, + MessageInfos: file_compute_scheduler_scheduler_proto_msgTypes, + }.Build() + File_compute_scheduler_scheduler_proto = out.File + file_compute_scheduler_scheduler_proto_rawDesc = nil + file_compute_scheduler_scheduler_proto_goTypes = nil + file_compute_scheduler_scheduler_proto_depIdxs = nil } diff --git a/compute/scheduler/scheduler.pb.gw.go b/compute/scheduler/scheduler.pb.gw.go index 473f0357..276d7ab7 100644 --- a/compute/scheduler/scheduler.pb.gw.go +++ b/compute/scheduler/scheduler.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: scheduler.proto +// source: compute/scheduler/scheduler.proto /* Package scheduler is a reverse proxy. @@ -9,24 +9,79 @@ It translates gRPC into RESTful JSON APIs. package scheduler import ( + "context" "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "golang.org/x/net/context" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_SchedulerService_PutNode_0(ctx context.Context, marshaler runtime.Marshaler, client SchedulerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Node + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.PutNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SchedulerService_PutNode_0(ctx context.Context, marshaler runtime.Marshaler, server SchedulerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Node + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.PutNode(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SchedulerService_DeleteNode_0(ctx context.Context, marshaler runtime.Marshaler, client SchedulerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Node + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SchedulerService_DeleteNode_0(ctx context.Context, marshaler runtime.Marshaler, server SchedulerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Node + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteNode(ctx, &protoReq) + return msg, metadata, err + +} func request_SchedulerService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client SchedulerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodesRequest @@ -37,6 +92,15 @@ func request_SchedulerService_ListNodes_0(ctx context.Context, marshaler runtime } +func local_request_SchedulerService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server SchedulerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListNodesRequest + var metadata runtime.ServerMetadata + + msg, err := server.ListNodes(ctx, &protoReq) + return msg, metadata, err + +} + func request_SchedulerService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client SchedulerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetNodeRequest var metadata runtime.ServerMetadata @@ -54,7 +118,6 @@ func request_SchedulerService_GetNode_0(ctx context.Context, marshaler runtime.M } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -64,24 +127,159 @@ func request_SchedulerService_GetNode_0(ctx context.Context, marshaler runtime.M } +func local_request_SchedulerService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server SchedulerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNodeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetNode(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterSchedulerServiceHandlerServer registers the http handlers for service SchedulerService to "mux". +// UnaryRPC :call SchedulerServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSchedulerServiceHandlerFromEndpoint instead. +func RegisterSchedulerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SchedulerServiceServer) error { + + mux.Handle("POST", pattern_SchedulerService_PutNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/scheduler.SchedulerService/PutNode", runtime.WithHTTPPathPattern("/scheduler.SchedulerService/PutNode")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SchedulerService_PutNode_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SchedulerService_PutNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SchedulerService_DeleteNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/scheduler.SchedulerService/DeleteNode", runtime.WithHTTPPathPattern("/scheduler.SchedulerService/DeleteNode")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SchedulerService_DeleteNode_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SchedulerService_DeleteNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SchedulerService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/scheduler.SchedulerService/ListNodes", runtime.WithHTTPPathPattern("/v1/nodes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SchedulerService_ListNodes_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SchedulerService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SchedulerService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/scheduler.SchedulerService/GetNode", runtime.WithHTTPPathPattern("/v1/nodes/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SchedulerService_GetNode_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SchedulerService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterSchedulerServiceHandlerFromEndpoint is same as RegisterSchedulerServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterSchedulerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -92,63 +290,101 @@ func RegisterSchedulerServiceHandlerFromEndpoint(ctx context.Context, mux *runti // RegisterSchedulerServiceHandler registers the http handlers for service SchedulerService to "mux". // The handlers forward requests to the grpc endpoint over "conn". func RegisterSchedulerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - client := NewSchedulerServiceClient(conn) + return RegisterSchedulerServiceHandlerClient(ctx, mux, NewSchedulerServiceClient(conn)) +} - mux.Handle("GET", pattern_SchedulerService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(ctx) +// RegisterSchedulerServiceHandlerClient registers the http handlers for service SchedulerService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SchedulerServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SchedulerServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "SchedulerServiceClient" to call the correct interceptors. +func RegisterSchedulerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SchedulerServiceClient) error { + + mux.Handle("POST", pattern_SchedulerService_PutNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/scheduler.SchedulerService/PutNode", runtime.WithHTTPPathPattern("/scheduler.SchedulerService/PutNode")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SchedulerService_PutNode_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return } + + forward_SchedulerService_PutNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SchedulerService_DeleteNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/scheduler.SchedulerService/DeleteNode", runtime.WithHTTPPathPattern("/scheduler.SchedulerService/DeleteNode")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SchedulerService_ListNodes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SchedulerService_DeleteNode_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SchedulerService_DeleteNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SchedulerService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/scheduler.SchedulerService/ListNodes", runtime.WithHTTPPathPattern("/v1/nodes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } + resp, md, err := request_SchedulerService_ListNodes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } - forward_SchedulerService_ListNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SchedulerService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_SchedulerService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(ctx) + ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/scheduler.SchedulerService/GetNode", runtime.WithHTTPPathPattern("/v1/nodes/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SchedulerService_GetNode_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SchedulerService_GetNode_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SchedulerService_GetNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SchedulerService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -156,12 +392,20 @@ func RegisterSchedulerServiceHandler(ctx context.Context, mux *runtime.ServeMux, } var ( + pattern_SchedulerService_PutNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"scheduler.SchedulerService", "PutNode"}, "")) + + pattern_SchedulerService_DeleteNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"scheduler.SchedulerService", "DeleteNode"}, "")) + pattern_SchedulerService_ListNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "nodes"}, "")) pattern_SchedulerService_GetNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "nodes", "id"}, "")) ) var ( + forward_SchedulerService_PutNode_0 = runtime.ForwardResponseMessage + + forward_SchedulerService_DeleteNode_0 = runtime.ForwardResponseMessage + forward_SchedulerService_ListNodes_0 = runtime.ForwardResponseMessage forward_SchedulerService_GetNode_0 = runtime.ForwardResponseMessage diff --git a/compute/scheduler/scheduler.proto b/compute/scheduler/scheduler.proto index ee2c5de8..8807333d 100644 --- a/compute/scheduler/scheduler.proto +++ b/compute/scheduler/scheduler.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package scheduler; +option go_package = "github.com/ohsu-comp-bio/funnel/scheduler"; + import "google/api/annotations.proto"; message Resources { diff --git a/compute/scheduler/scheduler_grpc.pb.go b/compute/scheduler/scheduler_grpc.pb.go new file mode 100644 index 00000000..394eb549 --- /dev/null +++ b/compute/scheduler/scheduler_grpc.pb.go @@ -0,0 +1,218 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.3 +// source: compute/scheduler/scheduler.proto + +package scheduler + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + SchedulerService_PutNode_FullMethodName = "/scheduler.SchedulerService/PutNode" + SchedulerService_DeleteNode_FullMethodName = "/scheduler.SchedulerService/DeleteNode" + SchedulerService_ListNodes_FullMethodName = "/scheduler.SchedulerService/ListNodes" + SchedulerService_GetNode_FullMethodName = "/scheduler.SchedulerService/GetNode" +) + +// SchedulerServiceClient is the client API for SchedulerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SchedulerServiceClient interface { + PutNode(ctx context.Context, in *Node, opts ...grpc.CallOption) (*PutNodeResponse, error) + DeleteNode(ctx context.Context, in *Node, opts ...grpc.CallOption) (*DeleteNodeResponse, error) + ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) + GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*Node, error) +} + +type schedulerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSchedulerServiceClient(cc grpc.ClientConnInterface) SchedulerServiceClient { + return &schedulerServiceClient{cc} +} + +func (c *schedulerServiceClient) PutNode(ctx context.Context, in *Node, opts ...grpc.CallOption) (*PutNodeResponse, error) { + out := new(PutNodeResponse) + err := c.cc.Invoke(ctx, SchedulerService_PutNode_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *schedulerServiceClient) DeleteNode(ctx context.Context, in *Node, opts ...grpc.CallOption) (*DeleteNodeResponse, error) { + out := new(DeleteNodeResponse) + err := c.cc.Invoke(ctx, SchedulerService_DeleteNode_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *schedulerServiceClient) ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) { + out := new(ListNodesResponse) + err := c.cc.Invoke(ctx, SchedulerService_ListNodes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *schedulerServiceClient) GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*Node, error) { + out := new(Node) + err := c.cc.Invoke(ctx, SchedulerService_GetNode_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SchedulerServiceServer is the server API for SchedulerService service. +// All implementations should embed UnimplementedSchedulerServiceServer +// for forward compatibility +type SchedulerServiceServer interface { + PutNode(context.Context, *Node) (*PutNodeResponse, error) + DeleteNode(context.Context, *Node) (*DeleteNodeResponse, error) + ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) + GetNode(context.Context, *GetNodeRequest) (*Node, error) +} + +// UnimplementedSchedulerServiceServer should be embedded to have forward compatible implementations. +type UnimplementedSchedulerServiceServer struct { +} + +func (UnimplementedSchedulerServiceServer) PutNode(context.Context, *Node) (*PutNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PutNode not implemented") +} +func (UnimplementedSchedulerServiceServer) DeleteNode(context.Context, *Node) (*DeleteNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteNode not implemented") +} +func (UnimplementedSchedulerServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") +} +func (UnimplementedSchedulerServiceServer) GetNode(context.Context, *GetNodeRequest) (*Node, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") +} + +// UnsafeSchedulerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SchedulerServiceServer will +// result in compilation errors. +type UnsafeSchedulerServiceServer interface { + mustEmbedUnimplementedSchedulerServiceServer() +} + +func RegisterSchedulerServiceServer(s grpc.ServiceRegistrar, srv SchedulerServiceServer) { + s.RegisterService(&SchedulerService_ServiceDesc, srv) +} + +func _SchedulerService_PutNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Node) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SchedulerServiceServer).PutNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SchedulerService_PutNode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SchedulerServiceServer).PutNode(ctx, req.(*Node)) + } + return interceptor(ctx, in, info, handler) +} + +func _SchedulerService_DeleteNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Node) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SchedulerServiceServer).DeleteNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SchedulerService_DeleteNode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SchedulerServiceServer).DeleteNode(ctx, req.(*Node)) + } + return interceptor(ctx, in, info, handler) +} + +func _SchedulerService_ListNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNodesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SchedulerServiceServer).ListNodes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SchedulerService_ListNodes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SchedulerServiceServer).ListNodes(ctx, req.(*ListNodesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SchedulerService_GetNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SchedulerServiceServer).GetNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SchedulerService_GetNode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SchedulerServiceServer).GetNode(ctx, req.(*GetNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SchedulerService_ServiceDesc is the grpc.ServiceDesc for SchedulerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SchedulerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "scheduler.SchedulerService", + HandlerType: (*SchedulerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PutNode", + Handler: _SchedulerService_PutNode_Handler, + }, + { + MethodName: "DeleteNode", + Handler: _SchedulerService_DeleteNode_Handler, + }, + { + MethodName: "ListNodes", + Handler: _SchedulerService_ListNodes_Handler, + }, + { + MethodName: "GetNode", + Handler: _SchedulerService_GetNode_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "compute/scheduler/scheduler.proto", +} diff --git a/compute/scheduler/testutils_test.go b/compute/scheduler/testutils_test.go index 3c2b5cc0..b061ff47 100644 --- a/compute/scheduler/testutils_test.go +++ b/compute/scheduler/testutils_test.go @@ -2,8 +2,7 @@ package scheduler import ( "context" - "io/ioutil" - "testing" + "os" "time" "github.com/ohsu-comp-bio/funnel/config" @@ -19,8 +18,8 @@ type testNode struct { done chan struct{} } -func newTestNode(conf config.Config, t *testing.T) testNode { - workDir, _ := ioutil.TempDir("", "funnel-test-storage-") +func newTestNode(conf config.Config) testNode { + workDir, _ := os.MkdirTemp("", "funnel-test-storage-") conf.Worker.WorkDir = workDir log := logger.NewLogger("test-node", logger.DebugConfig()) @@ -78,17 +77,3 @@ func (t *testNode) AddTasks(ids ...string) { t.Client.On("GetNode", mock.Anything, mock.Anything, mock.Anything). Return(&Node{}, nil) } - -func timeLimit(t *testing.T, d time.Duration) func() { - stop := make(chan struct{}) - go func() { - select { - case <-time.NewTimer(d).C: - t.Fatal("time limit expired") - case <-stop: - } - }() - return func() { - close(stop) - } -} diff --git a/compute/scheduler/util.go b/compute/scheduler/util.go index 5e99b5e2..7acfa406 100644 --- a/compute/scheduler/util.go +++ b/compute/scheduler/util.go @@ -6,9 +6,9 @@ import ( uuid "github.com/nu7hatch/gouuid" "github.com/ohsu-comp-bio/funnel/config" - pscpu "github.com/shirou/gopsutil/cpu" - psdisk "github.com/shirou/gopsutil/disk" - psmem "github.com/shirou/gopsutil/mem" + pscpu "github.com/shirou/gopsutil/v3/cpu" + psdisk "github.com/shirou/gopsutil/v3/disk" + psmem "github.com/shirou/gopsutil/v3/mem" ) // GenNodeID returns a UUID string. @@ -23,8 +23,8 @@ func GenNodeID() string { // // Upon error, detectResources will return the resources given by the config // with the error. -func detectResources(conf config.Node, workdir string) (Resources, error) { - res := Resources{ +func detectResources(conf config.Node, workdir string) (*Resources, error) { + res := &Resources{ Cpus: conf.Resources.Cpus, RamGb: conf.Resources.RamGb, DiskGb: conf.Resources.DiskGb, diff --git a/compute/slurm/backend.go b/compute/slurm/backend.go index 310c1be6..1cb3714e 100644 --- a/compute/slurm/backend.go +++ b/compute/slurm/backend.go @@ -6,7 +6,7 @@ import ( "bytes" "context" "fmt" - "io/ioutil" + "os" "os/exec" "regexp" "strings" @@ -22,7 +22,7 @@ import ( // NewBackend returns a new Slurm HPCBackend instance. func NewBackend(ctx context.Context, conf config.Config, reader tes.ReadOnlyServer, writer events.Writer, log *logger.Logger) (*compute.HPCBackend, error) { if conf.Slurm.TemplateFile != "" { - content, err := ioutil.ReadFile(conf.Slurm.TemplateFile) + content, err := os.ReadFile(conf.Slurm.TemplateFile) if err != nil { return nil, fmt.Errorf("reading template: %v", err) } diff --git a/compute/util.go b/compute/util.go deleted file mode 100644 index 88fcdcbd..00000000 --- a/compute/util.go +++ /dev/null @@ -1,15 +0,0 @@ -package compute - -import ( - "fmt" - "os" -) - -// detectFunnelBinaryPath detects the path to the "funnel" binary -func detectFunnelBinaryPath() (string, error) { - path, err := os.Executable() - if err != nil { - return "", fmt.Errorf("Failed to detect path of funnel binary") - } - return path, err -} diff --git a/config/config_test.go b/config/config_test.go index 449543ef..0e2194b2 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -11,7 +11,9 @@ Node: DiskGb: 50.0 ` conf := Config{} - Parse([]byte(yaml), &conf) + if err := Parse([]byte(yaml), &conf); err != nil { + t.Error(err) + } if conf.Node.Resources.Cpus != 42 { t.Fatal("unexpected cpus") diff --git a/config/gce/meta.go b/config/gce/meta.go index a6aee7ed..ab000d87 100644 --- a/config/gce/meta.go +++ b/config/gce/meta.go @@ -3,7 +3,7 @@ package gce import ( "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "strings" @@ -101,7 +101,7 @@ func LoadMetadataFromURL(url string) (*Metadata, error) { return nil, fmt.Errorf("Non-200 response status from GCE Metadata: %d", resp.StatusCode) } defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return nil, err } diff --git a/config/gce/meta_test.go b/config/gce/meta_test.go index 4d7fc2b9..823b863a 100644 --- a/config/gce/meta_test.go +++ b/config/gce/meta_test.go @@ -1,17 +1,17 @@ package gce import ( - "io/ioutil" "net" "net/http" "net/http/httptest" + "os" "testing" "github.com/ohsu-comp-bio/funnel/config" ) func loadTestData(name string) []byte { - b, err := ioutil.ReadFile(name + ".json") + b, err := os.ReadFile(name + ".json") if err != nil { panic(err) } @@ -20,7 +20,7 @@ func loadTestData(name string) []byte { func testServer(f http.HandlerFunc) *httptest.Server { // Start test server - lis, err := net.Listen("tcp", ":20002") + lis, err := net.Listen("tcp", "localhost:20002") if err != nil { panic(err) } @@ -40,7 +40,9 @@ func TestGetMetadata(t *testing.T) { if v, ok := r.URL.Query()["recursive"]; !ok || v[0] != "true" { t.Fatal("Expected recursive query") } - w.Write(loadTestData("metadata1")) + if _, err := w.Write(loadTestData("metadata1")); err != nil { + t.Error(err) + } }) defer ts.Close() diff --git a/config/internal/bundle.go b/config/internal/bundle.go index 48cdd437..fe930659 100644 --- a/config/internal/bundle.go +++ b/config/internal/bundle.go @@ -1,12 +1,12 @@ -// Code generated for package main by go-bindata DO NOT EDIT. (@generated) +// Code generated for package config by go-bindata DO NOT EDIT. (@generated) // sources: -// config/default-config.yaml // config/gridengine-template.txt -// config/htcondor-template.txt -// config/kubernetes-executor-template.yaml -// config/kubernetes-template.yaml // config/pbs-template.txt // config/slurm-template.txt +// config/kubernetes-executor-template.yaml +// config/default-config.yaml +// config/htcondor-template.txt +// config/kubernetes-template.yaml package config import ( @@ -14,7 +14,6 @@ import ( "compress/gzip" "fmt" "io" - "io/ioutil" "os" "path/filepath" "strings" @@ -83,62 +82,62 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _configDefaultConfigYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x3a\x5d\x73\x1b\x39\x72\xef\xf3\x2b\x3a\xe2\x5e\xc5\x5b\xc5\x2f\xed\xd6\x5e\x72\xac\xd2\x83\xbe\xd6\x56\x2c\x7b\x19\x91\x8e\x93\x27\x17\x66\xd0\xc3\xc1\x72\x06\x98\x05\x30\xa4\x69\xc7\xff\x3d\xd5\x0d\xcc\x07\x25\x79\xed\xbb\x93\xab\x36\x75\xa7\x17\x71\x80\x46\xa3\xd1\xdf\xdd\xc0\x08\xd6\x05\x82\x16\x15\x82\xc9\xc1\x17\x08\x22\xf3\x6a\x87\xe0\xd0\xee\xd0\x82\x14\x5e\xa4\xc2\x21\xa4\x22\xdb\xa2\x96\xc9\x08\xce\x77\x42\x95\x22\x2d\xbb\x31\xb7\x80\xd4\x94\x5e\xa6\x63\x48\x85\xdc\xa0\x1d\xf3\x32\xe7\x8d\xc5\x31\xc8\x83\x16\x95\xa1\x49\x2c\x85\xf3\x2a\x1b\x43\x65\xf4\xc6\xc8\x34\xb9\x8a\xc8\xdb\xf5\x49\xf2\x59\x72\x32\x53\xd5\x8d\xff\x12\x19\xa5\xc9\x44\x39\x86\xc2\x67\x46\x4b\x63\xc7\xe0\xca\xc6\x56\x63\xa8\x53\x37\x86\x8d\x55\x12\xf5\x46\x69\x1c\x43\x25\x74\x43\x90\x62\xef\x26\xa9\xf0\x59\x91\x5c\x86\x0d\x22\x8e\xdf\xa1\x04\x77\xa8\x3d\xec\xad\xf2\x68\xdb\xad\x9f\xb9\xef\xa7\x9f\x25\x69\x33\xfe\xdb\xd8\x33\x86\xad\xc8\xb7\x22\xb9\xa6\x0d\xdf\xf2\x7e\x6e\x91\x00\x4c\x5a\x6e\xd1\xcf\xd2\x6c\x92\xe4\xd6\x6c\x36\x68\x69\x6e\x04\xf4\x5b\xe9\x0d\x94\xb8\xc3\xd2\x2d\x40\x62\xda\x6c\xc6\xa0\x74\x6e\xc6\x80\xd6\x1a\x9b\x00\xdc\xd2\xe4\x82\x07\x79\x11\x63\x27\x5c\x0e\xbc\x01\x5f\x28\x07\xb5\xf0\xc5\x14\x6e\x72\xc0\xaa\xf6\x87\x71\x98\x14\x16\xf9\xe4\x1e\x35\x01\x3a\x2f\xd1\xda\x69\x02\xf0\x4b\xe3\xeb\xc6\xff\xac\x4a\x5c\xc0\xc9\x49\x92\xac\x58\x7b\x02\x45\x2f\x8c\xf3\x43\x3e\xfe\xdc\x68\x8d\x65\x54\x30\x5a\x4c\x00\xaf\x45\xd5\xf2\xbe\x30\xce\x27\xbc\x72\x69\xac\x87\xc6\xa1\x84\xdc\x58\x78\xb1\x5e\x2f\x49\x0f\xaa\x46\xab\x4c\x78\x65\x34\x08\x2d\x19\xe5\x1e\x53\x90\xc2\x15\xa9\x11\x56\x32\xca\xf5\x7a\x49\xab\x17\xf0\xef\xf3\xf9\xfc\x31\x6c\x77\xcb\xcb\x63\x64\xb4\xec\x6e\x79\x19\x56\xfd\x65\xfe\x97\xb8\xea\x0e\x7f\x6b\x94\x25\x89\x3a\x95\x81\x68\x7c\x81\xda\xb7\xfb\x13\x22\xda\x3f\x1a\xcb\xf9\xf2\xc6\x41\xe3\x88\xfd\x02\x6a\xe1\xdc\xde\x04\x72\x46\xc4\x48\xda\x9a\x34\x6f\x8b\xe0\x1a\x8b\xc4\xc0\xda\x9a\x1a\x6d\x79\x00\x8b\xce\x5b\x95\x79\x10\x59\x86\x2e\x4a\x81\xb4\x5e\xe7\x6a\x03\xb9\x2a\x91\xb1\x3c\xc3\xe9\x66\x0a\x59\x51\x19\x09\x7f\x9e\xcf\x21\x67\x56\x4e\x03\xd8\xf4\x50\x95\xdf\x33\xd8\x05\xd1\x7a\xde\xf8\x22\x08\x80\xf4\xe4\x8d\x43\xbb\x20\x12\xec\x69\x1c\x03\x58\x46\x0a\x17\x20\xd2\xec\xf4\x87\x1f\x1f\x01\xfe\xe1\x11\xe0\xdc\x98\x54\xd8\xc0\x9d\x1b\x9d\x95\x8d\x44\x10\x70\x72\x29\xb2\x02\x27\x97\x46\x7b\x6b\xca\x05\x68\x33\x61\x0d\x3f\x09\x72\x2b\x50\x48\xb4\xa0\x34\x3c\x47\x3f\xbb\x55\xce\xd3\x99\x6b\xa3\x1d\x3a\xc6\xc4\xdc\x08\xb6\x95\x89\xac\x20\x1e\xa6\x07\x50\xda\xa3\xad\x50\x2a\x61\x0f\xcc\x65\x95\xa1\x23\x8e\x5e\x29\x47\x86\x46\xb8\x79\xe3\x05\x78\xdb\x60\x92\xdc\x2d\x2f\x2f\x4b\x85\xda\x87\xa3\x93\x94\xa3\x70\x84\x94\x16\x1d\x6d\x16\x94\xf3\x3c\x7c\x0f\x94\x6e\xd1\x4b\xfd\xd2\xa2\x24\x39\x8b\xd2\xb1\x90\x2f\xfe\x1f\x49\x3f\x48\x2f\x4c\x06\xc5\xbf\x2f\x67\x1e\xcd\x8c\xd6\x98\xf1\x41\xbc\xaa\xd0\x34\x9e\x68\x5d\x87\x9f\x0b\xf8\xf3\xdc\x05\x38\x72\x83\x95\x78\xaf\xaa\xa6\x02\xdd\x54\x29\x5a\x36\x64\x55\xa1\x03\x5f\x08\x0f\x02\x2c\xfe\xd6\xa0\xf3\xb0\x57\x65\x09\x29\x82\x45\x6f\x55\xb4\xb3\x5c\xa8\xb2\xb1\x41\x68\x23\x46\x0f\x29\xfa\x3d\xa2\x8e\x60\xc4\xe0\xb2\x34\x7b\x07\x42\x03\xbe\xaf\x8d\x0e\x8c\x67\x1f\x6a\xf2\x1c\x9c\x17\xd6\x33\x57\x3d\xfc\x04\x0e\xc9\xb7\x07\x9d\x69\x6a\x62\xd5\x29\x54\x4a\x37\x9e\x78\xf4\x4a\xbc\xbf\x0b\x48\x17\x70\x3a\x6f\x9d\xb8\xcb\x0a\x94\x4d\x49\xea\xe7\x7a\x07\x40\x1c\x7e\xc5\x61\xe0\x7e\x70\x99\x26\xab\x76\x45\xeb\xc1\xf6\x60\xf2\xe8\xf4\x6c\xa3\x41\x0c\x71\x7a\xb4\x9d\x03\x69\x17\xde\x09\x0a\x25\xa7\xae\x5b\x5e\x09\x7d\x00\x2f\xdc\x96\xa5\xdb\xae\x26\x7b\x30\x1a\x1f\xc7\x71\x59\x34\x7a\xcb\xe7\x68\x91\x94\x46\x6f\x68\xf9\x5e\x28\xdf\x71\xb1\xa9\xa5\xf0\xe8\x20\xc5\xdc\x58\x12\x95\xdd\x06\x15\xd4\x46\x22\x48\x14\xac\x83\xaf\x8d\xc4\xa5\xd2\x9b\x4e\xbe\xa7\xd5\xe3\x68\x89\x35\x71\x2d\x7b\x78\x61\xfd\xf8\x3e\x6e\x62\xdd\x03\xec\x37\x5a\xf9\x0e\xfb\x4f\x55\x92\xd0\xe0\xa2\x55\xff\x18\x45\x22\xe6\x9b\xab\x4e\x57\x44\xe3\x4d\x25\xc8\xa6\xca\xf2\x00\x1b\xd4\xc4\x09\x64\xac\x37\x57\x21\x98\x44\x14\xdd\xae\x85\xa0\xd3\xa2\x06\x25\x4b\x64\x82\xe9\x04\x48\x22\x15\x9a\xc1\xa2\x42\x8f\x41\x45\xa5\x74\x45\xe3\x41\x9a\xbd\x0e\x6a\x38\x39\x85\x0a\x85\x26\x05\x46\x8b\xa4\x16\xda\x74\x56\x00\xf3\x76\x32\x0c\x80\xaa\xd8\x03\x79\x2c\x0f\x20\x72\x8f\x41\x77\x72\x65\x9d\x67\x91\x1e\xd9\xcd\xe4\x34\xda\xcd\x39\x73\x25\x6c\x7f\x7c\x48\x6f\x0f\xc4\x5b\x89\x1e\x33\x0f\x7b\xb2\x21\x8b\xce\x34\x36\xc3\x10\x62\x45\x97\x47\x78\x03\xca\x07\x9a\xaf\x30\x57\x9a\xb8\x7f\xd7\xc1\xaa\x70\x5a\xde\x27\x78\x81\x26\xa8\x11\x98\x1d\x5a\x4a\x77\x5c\x08\xe6\x29\x16\x62\xa7\x0c\x47\xdb\x6e\x39\xc9\x86\x7d\xdd\xf2\x8d\xeb\xb7\x9c\xb6\xa3\x75\xe3\x16\xc0\xee\x90\x1d\xe9\xf9\xab\x1e\x66\xcc\x7e\xfc\xa2\x05\xbd\x13\xd5\xf3\x74\x01\xf3\x69\x07\x7d\xa5\xdc\x16\x5c\x2d\x32\xfc\xec\x22\x02\x19\xac\x1a\xc1\xcf\x2c\xc7\xfd\x84\x13\x17\xf0\x0d\x9d\x75\xfa\xd0\xfc\xdc\x41\x67\xb0\x57\xbe\x78\x3c\x97\x78\xc3\xd6\x10\xcc\xef\x27\x97\x24\x6f\x8d\xdd\xb6\x66\x4c\xe9\x89\x83\xcc\x22\x29\x18\xc8\xc6\x12\x37\x6b\x6b\xc8\xe7\xd2\xcf\x56\x25\xdb\x0c\x87\xd9\xab\x1c\x48\x65\x31\xf3\xc6\x1e\x68\x03\x42\x78\xa5\xec\x02\xa6\xb3\xe0\x62\x27\x7b\x63\xb7\x13\xa9\xec\x5f\x75\x8c\xda\x94\x25\xab\x6e\x26\x74\x46\x27\x50\x1b\x2d\x4a\xf2\x17\x4b\x53\x96\x4a\x6f\xfa\x23\xfc\x35\xcc\x41\x2d\x29\x2b\x33\x8d\x9f\xa1\xb5\xac\x9d\x94\xb9\x75\x4e\x22\x46\x96\x07\x6c\x1b\xc1\x0a\xbd\x0f\xb6\xad\x18\x6c\x1e\xd8\x61\xd1\x35\xa5\x8f\x9a\xe6\x48\xeb\xb1\x94\xa4\x50\x04\x1b\xb0\x4a\x72\x87\x4a\x6f\xca\x60\x77\x8c\xad\x37\x13\x7c\x8f\x59\xe3\x8d\x05\x7c\xaf\x3c\x47\x81\x5b\xb3\xb9\x2f\x25\x5a\xf2\x4a\xbc\x87\xf4\x10\x89\xe4\xd4\x81\xf9\x33\x38\x4d\x54\xf7\xf6\x50\x11\xd7\x5a\xa8\x72\xa5\x3e\x90\xbb\x9d\xcf\xe7\x73\x18\xc1\xe9\x1c\x5e\x5e\x04\xa4\xaf\x8d\xad\x82\xcd\x51\x96\xc8\xba\x00\x12\x4b\xa4\x6d\x94\x77\x3c\x44\x27\xe9\x44\x1c\x29\x0f\x54\x77\x4c\x5e\x13\x53\x4c\xcd\xa6\x25\x43\xe6\x11\x83\xdf\xd0\xb2\x6e\x51\xec\xb0\xd3\x8f\x5c\x94\x0e\x03\x15\xb7\xaa\x52\x3e\xf8\xaf\x2e\x80\x66\x46\x67\x8d\xb5\x94\xef\x90\x5f\x2a\x8d\x90\x6e\xd6\xd4\xfc\x3f\x44\xb2\xa5\xb0\xa2\x2c\xb1\x5c\x5b\xa1\x5d\x4e\xc9\x7f\x88\x69\x93\xa7\xfd\x4b\x46\xd0\xd6\x61\x14\x82\xe5\xcc\x58\xe0\x92\x03\x62\xcd\x31\x7b\x21\xb4\x2c\xd1\xba\xa7\xdf\x3a\xb9\x30\xa5\xbf\xba\x58\xc4\x34\x85\x8c\x3a\x28\x68\x57\x76\xc6\xe4\x87\xe6\x1e\x31\xb9\xf8\x3d\xa5\xd2\xf1\x8a\x0b\xa9\x16\xd9\x85\x70\xc8\x45\x87\x37\x14\xf2\x59\x95\xda\x52\x0b\x3c\x0b\x90\xbc\x36\xfd\x68\x41\x8f\x72\xa6\xf3\xb7\x2b\xb0\xb8\x51\x46\xb3\xcb\xa4\x1f\x1c\x8c\xda\xb9\xf3\x90\xa9\x6d\xf1\x00\x37\x57\x09\xc0\x4b\x3c\x1c\xcd\xaf\x30\xb3\xe8\x5b\xb0\x97\x78\xe0\xbc\x93\xc6\x42\x4c\xbb\x0e\xc5\x5e\x3c\xb9\xc5\x5c\xbd\x1f\x92\xaa\xb4\xc4\xf7\xe8\xe0\x19\x29\xfb\x38\xd4\x9c\x6e\xcc\xe1\xcf\x51\x96\x77\x43\xf3\x61\xd9\x11\xd9\x6f\xee\x6e\xdb\x32\x2b\x96\x93\x0e\x85\xcd\x8a\xa1\x87\xbc\xbb\x5d\x40\xe1\x7d\xbd\x98\xcd\x06\xa9\xef\x0f\x73\xce\x97\x9e\x1b\x43\x86\x7c\x59\x9a\x46\xb2\x5e\x04\x4b\x64\x9b\x6b\x85\x32\x4d\xba\x09\xa2\x7f\x69\xcd\xaf\x98\xf9\xee\xf8\xad\x1c\x45\x96\x99\x86\xd2\xf9\x61\x2e\xad\x42\x84\x19\xc1\x2f\x6c\x4d\xa2\xe4\x1a\xb3\x36\xce\x29\x8e\x11\x43\xe0\xc7\x53\x04\xa9\x5c\x46\xe1\x0d\x25\xe3\xc9\xad\xa9\xc2\x79\xf5\x4e\x59\xa3\x2b\xd4\x1c\x30\x07\x19\x7c\x5f\x96\xbe\xa2\xca\xba\x55\x11\x2a\x00\x1c\x14\x86\xfc\x19\xd7\xf7\xa1\x20\x40\x37\x48\xec\x51\x46\xce\xb1\xe7\xe2\x15\x21\x6c\x4e\x06\xb5\x2a\x87\xb3\x56\x61\x95\x3b\x56\x60\x56\x42\x4e\x3a\x29\x68\x29\x0d\x91\x86\x81\x97\x0b\xce\x98\x56\x70\x65\xd3\x35\x45\x06\x72\x5d\xb7\xa9\x48\x24\xb5\x62\xce\xc6\x3c\xfc\x5e\xee\x16\xcb\x11\x4a\x55\xb9\xc2\x92\xb0\x2f\x50\x07\x66\x71\xce\xd2\x66\xfe\x94\x25\x6a\x09\x5c\xc9\x50\x06\x4e\xf9\x34\x55\x24\x9c\x42\x74\xd9\x85\xa3\xe8\x68\x34\xc9\x29\x14\x6a\x3d\x29\x1f\xd0\x9a\x71\x28\x55\x44\x59\x42\x25\x0e\x90\x96\x26\xdb\x12\x21\x48\x34\x10\x55\xb4\x4d\x20\xac\xaf\x38\xda\x8a\x2f\x45\x40\x47\xd6\xa8\x5c\x11\x72\xbe\x61\x06\xd9\x16\x33\xcc\x42\xa2\xb4\x2d\x64\xb8\x71\x61\x83\xd8\xb3\x7b\x95\x1a\x8d\x29\xad\xb8\x82\x38\xae\xd7\x18\x9f\xa4\x74\xdb\xe8\x63\x19\x49\x4a\xad\x50\x52\xc1\x49\xe3\x57\xbd\xf3\xc1\x92\xa9\x6a\xa9\x88\x3a\xde\x17\x54\xa4\x54\x2f\x45\xbe\x15\x8b\xae\xae\xec\x14\x84\x41\xd7\xa6\x56\x59\x27\xca\x6f\xe1\xbc\x63\xe3\x0a\x2e\x62\xcb\xe9\x1b\x78\xe9\x17\xeb\x4b\xee\xa7\x05\xbb\x59\x37\x56\x03\x15\x66\xec\x14\x9c\x17\x9e\x2a\x3e\x8a\x67\xaa\x44\x3b\x85\xb7\x05\x6a\x40\x4d\xae\x55\x8e\xdb\x54\xa3\x6f\xb5\xa0\xeb\xd3\xb7\x17\xcb\x4b\x46\xd9\x57\x53\xde\x40\xae\xb4\x6c\x4b\x25\xae\x2f\x2d\x82\xf3\x4d\xb6\x25\x8d\x14\xf0\x5b\x83\x0d\x99\x25\xef\x4b\x79\x85\xb5\xc6\x52\x12\xa2\x65\x2c\x0a\x63\xaa\xd3\xa6\x0a\x01\x92\xbc\x91\x95\x94\xa6\x1c\x06\xfd\x83\xbb\x8e\xee\xd8\x40\x08\x2d\x9f\x38\x48\x09\x0a\xe9\x79\xd1\xe7\x58\xc5\x83\x56\x24\x7f\x0b\x8b\x2e\x6c\xc4\x76\x13\x0e\xfd\xaf\xae\x6b\x57\x46\x7d\xf7\x85\x71\xc4\xac\xda\x58\xdf\xeb\x5b\x0f\x74\xb4\x33\x85\x7b\x32\x82\x35\x56\x75\x29\x3c\x76\x6e\xac\x1f\x5a\xc0\xff\xb2\xb2\x35\x5a\x91\xe6\x21\x9c\xc1\x4e\x68\x55\x96\x82\x87\x37\xe8\x51\xef\xe0\x0c\xd6\xe1\x68\x10\xf3\x1a\x2e\x2d\xce\xe0\xe3\xc7\xe9\x75\xf7\xfd\xe9\x13\x03\x08\xbb\x69\xc8\x85\x3a\x38\x6b\xf3\x25\x2a\x78\x27\x93\xd8\x8c\xf8\xf8\x71\x7a\xc9\xbf\x3e\x7d\x82\xc9\x84\xf8\x3b\x51\x92\x46\xd7\xc2\x6d\x6f\x64\xc4\x42\x29\x27\xe3\x8f\xd9\xd0\xa7\x4f\xb3\xd0\x91\x9d\x70\x24\x9b\x94\x66\x13\xc8\x21\xd9\xdd\x87\x8c\x31\x3e\x34\x17\x19\xcc\x70\x77\xf1\xf3\x70\xa6\xf1\x0c\xe7\x0a\xd3\x94\xf2\x9d\x8f\x09\xd3\xbb\x9c\x13\xfe\x33\xf8\x9f\xeb\x15\xcf\x93\x1f\x7c\xe7\x4d\x0f\xd0\x21\xfe\xe5\xf5\xbb\xeb\xff\xbe\x59\xbf\xfb\xe5\xee\xdd\xf5\x7f\xdd\x5c\xae\x19\xfc\xe3\x47\x95\x83\x46\x98\x52\x2d\x04\x73\x98\xc4\xd3\x7d\xfc\x58\x5b\xa5\x7d\x0e\x27\xb1\xf1\xf1\x2e\x23\x80\x33\xf8\x93\x3c\x09\xc0\x1d\xe0\x04\x50\xcb\xee\x2b\xa2\xe3\x7a\x89\x0a\x9f\xdf\xc1\x58\x61\x45\xd9\xe8\x19\xfc\x69\x3a\xcf\xe1\xf9\xc5\x49\x5c\xf6\xfb\x98\x43\x51\xf5\x05\xd4\x92\x8a\xb3\x21\xe2\xb0\xea\x01\x66\xfe\x64\x6b\x4b\x92\xe5\xc5\xea\x9f\xc6\xff\x07\x35\xfe\xd1\xbf\xa4\x4a\xcf\x52\xe1\x8a\xf0\xb9\xbc\x58\xc1\xe4\xf5\x03\x9b\x0c\xe3\xe6\x4b\x36\x14\xc0\xf0\x4b\x26\xf9\x65\xdb\x08\x88\xca\x90\xb3\x9e\x9d\x2e\xea\x5a\x9f\x3d\x81\x81\xb4\x68\x2b\xac\xce\x48\x85\x37\xe9\x13\x98\x46\x8b\x94\x1c\x46\x8f\xf5\xf7\xec\xe2\x9e\xef\xfc\x4a\x5f\x79\x73\x75\x24\x96\xe4\xb9\x55\xf2\x9a\xaf\xa4\x16\x7f\x9b\xac\xbf\x7b\x54\xd2\xdf\x7d\x8d\x9c\xbf\xfb\x0a\x29\x13\x50\x27\xc1\xaf\x95\xfb\x77\x30\xa9\x11\xaa\x5a\x3d\x85\x3f\x0c\x14\x14\xef\x76\xad\xbc\x9f\x3f\x85\xb8\x23\xd2\xdc\xa9\x0f\xd8\x61\xfd\xf6\xe2\x5e\x95\x8d\xad\xfe\xe9\x47\xff\xb0\x7e\x74\x76\x6c\x5c\xab\x8b\xf3\xf5\xe5\x0b\x98\x4c\x7e\x35\xe9\x84\x8b\x90\x07\x96\xd6\x81\xe8\xc0\xeb\xd3\x7b\xc3\x21\xc1\xf9\x92\x95\x75\xe0\x31\x1f\xf9\x82\xe9\x7e\x85\x0d\x76\x18\x29\x33\x99\xd4\x68\x59\x1f\x9f\xc4\x20\x3b\xd4\x15\x56\x9c\x44\x3c\x49\x72\xd2\xa3\xf5\x55\xdd\xa3\xfd\xf6\x36\xc9\xed\x9a\x0b\xe1\xb3\x02\x24\xba\xcc\xaa\x34\xaa\xfd\x71\x43\xbd\x2d\x2d\xcf\xdf\xae\x20\x40\x3f\xb8\x34\x6a\xf1\x3c\xa9\x81\x77\xfb\xb5\xda\x7f\xdf\xb0\x35\x17\xda\x7c\x4f\x13\xec\xb7\xb7\xdd\x3f\xbc\xdd\x0e\x0f\xf7\xa8\xd5\x8e\xe0\x3f\x4c\x1a\x2e\x3e\x58\x0a\x99\xd0\xdc\x33\x50\xbe\x40\xbe\xa6\xe2\x67\x05\x51\x32\x95\xf8\x60\x74\x77\xbd\x01\xaf\x69\xee\xd9\xf9\xdd\xeb\xef\xe9\xc8\x47\x78\x16\x70\x12\xad\x8a\x2c\x5b\x62\x7e\xd2\xee\xf5\x9f\xe4\x17\xff\xbe\x6d\x18\xc5\xf1\x0e\xec\x6d\x4f\xee\xf5\x15\xdb\x3e\x9d\xab\x31\x53\xb9\x42\x09\xbf\x9a\x34\x38\xe6\xf0\xae\xc1\xc4\xab\x0a\x86\xa2\x39\xd9\x33\x42\x3d\x68\x4b\xf6\x0d\xc8\x61\x9b\x71\x04\x2f\x9b\x14\xad\xe6\x86\xf7\xd7\xe8\xf7\x00\xfc\x81\x82\xf7\x73\x8b\xee\x66\xb8\x6b\xef\x73\x8b\xcb\x9b\x38\x10\xa2\x86\x9b\x0e\x9e\xc4\xb4\x90\x6e\x01\xd2\x64\x5b\xb4\x63\xd8\x76\x08\x13\x80\xeb\x38\xbf\x80\x93\x30\x7f\x02\x4f\x69\x48\x2f\x87\x7b\x3d\x6a\x49\xff\xe8\x21\xf2\x48\x57\x48\xad\xc3\x05\x9e\x37\xe0\x6a\xb1\xd7\xa4\x82\x2e\x36\x31\x13\xe8\x01\xba\xbe\xef\x2b\xe1\xc2\x93\x28\xf2\x8e\xa4\xaf\x3e\x06\xd8\x29\xac\x10\x43\xcf\xd9\x2d\x66\xb3\x5e\xea\x53\x65\x66\xd2\x64\x6e\x66\x31\x47\x8b\x3a\xc3\x59\x77\x01\x3c\x00\x9b\x88\x5a\xcd\x76\xa7\xd3\xd3\x7f\x9b\x8d\xc8\x9c\x76\xa7\xf1\xcd\xd6\x30\x86\x47\x22\x86\x71\xbe\xed\x96\xd6\x83\x8b\x85\x2a\x10\x79\x44\xde\x63\xe9\x41\x78\x05\x72\x7c\xa7\x9a\xdf\xb7\x90\x56\xa5\xa7\x49\xeb\x3f\x3a\xa4\xfd\x3b\x83\xee\x2a\xa9\xd3\x14\xee\x25\xb7\xea\xfe\xe0\x04\xf7\x27\x3e\x77\x92\xce\xf2\x86\xe7\x78\x6c\x71\xf4\x04\x4f\xdd\x15\x1c\xc1\xca\x1b\x2b\x36\xf8\x0d\x1a\x8e\xa3\xbf\xe3\x52\xe0\x73\x57\x02\xc9\x08\x6e\x4d\x26\x42\x91\x07\xee\xe0\x3c\x56\xd3\x84\x87\xe2\x41\x82\x57\x7b\x5b\x28\x8f\xa5\x72\xdc\x5e\xe7\x26\xff\xe0\x76\x90\x04\xe0\x60\x5f\xa8\xac\x68\x5d\x8d\x72\x20\xca\xd2\xec\x83\xfb\x0b\x2f\x78\xf8\xb2\x20\x0c\x5e\xa9\xbe\x23\x3c\x9d\x11\x15\x2f\xd6\xeb\x65\xdc\xb1\x7b\x90\xe2\x4d\x77\x0b\x08\x75\x93\x96\x2a\x83\xd0\xbc\x8a\xad\xea\x3d\xa6\xb0\x53\x02\x04\x3c\xbf\x5e\xb7\xef\x6d\xa6\xc9\x00\xd5\xe2\xe8\x9e\x80\x14\x8f\xec\xed\x99\xfb\x7e\xb8\xc2\x1d\xb5\xd8\x7f\x9c\xbb\x24\x09\xf1\x6c\xf5\xe3\xa2\x77\x56\xb2\xbd\xbc\x7c\xe2\xe7\x3f\xf7\x5e\xe7\x3c\xd5\x55\x5a\x6f\xa7\xc8\x37\x2a\xc4\xd7\xf6\xfd\x25\xd3\xb0\xfa\x11\x6a\x6b\x76\x4a\xa2\x75\xe0\x9a\xac\x00\xe1\xe0\x95\xd2\xca\xb4\xf7\x9d\x97\x58\x17\xc9\x08\x9e\x93\xf3\x51\x19\x31\x23\x3c\x84\xeb\x19\xc2\x4e\x3b\xbc\x84\xbb\xd6\xb2\x36\x4a\x87\xdd\xc3\x50\x4b\x72\xf8\x1a\x12\x17\xee\xd3\x06\x32\x7a\x8c\xc7\x7f\xe0\x1b\xb3\xd5\x5e\xe5\xfe\x71\xba\xdf\x38\xb4\xaf\x3f\x73\x29\x02\x70\xde\xf8\x82\xaf\x1a\x63\xad\xa5\x85\xf6\x03\xe8\x30\x10\x5f\xf8\xb4\xa9\xcc\x60\x7e\x04\x3f\xcd\xe7\xf0\xea\x82\xe8\x2a\x1a\xbd\x5d\xa9\x0f\x78\x71\xa0\xd4\x83\x26\xc2\x5f\x92\xfc\x7c\xa4\xfe\x0f\x49\xec\x5f\x3b\xcd\x5d\xa4\x78\x01\x27\x42\x1b\x7d\xa8\x4c\xe3\xee\x91\x3d\x18\xff\xbf\x00\x00\x00\xff\xff\xb2\x17\xf6\x13\x17\x2d\x00\x00") +var _configGridengineTemplateTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x90\xcd\x4a\xc4\x30\x14\x85\xf7\x79\x8a\x6b\xc7\x59\x26\xed\x0b\xb8\xb2\x30\xb8\x71\x21\x82\x4b\x69\xc9\x0d\x13\x32\xf9\xe1\x26\x51\x30\xe4\xdd\xa5\x69\x11\x0a\x75\x76\x97\xc3\x77\x3e\xb8\xe7\xf4\xd0\xcf\xda\xf5\xf3\x14\xaf\xec\xf4\x08\xfc\x15\x4a\x11\xef\x53\x34\x2f\xb2\xd6\x96\xf8\x25\xf9\xf0\x64\x46\x4d\xb5\xf6\x2a\x3b\x87\x37\x1e\x93\xf4\x39\x35\x00\xff\x03\x90\x88\x95\xa2\x15\x38\x04\xf1\x1c\x72\x84\x01\x78\xad\xac\x94\x40\xda\x25\x05\xdd\x52\x0f\x08\x36\x68\x38\xcb\x6e\x85\x1a\xc0\x01\x9d\x6c\xd7\x56\x7f\x9b\xec\x65\x86\x41\x1c\x19\x6e\x70\xfd\xfc\xb2\x68\x9f\xce\x62\x50\x97\x6e\x83\x8f\x3d\xa3\x8e\xe6\xae\x48\x45\xfd\x83\x7f\xa6\x15\xdf\xa9\xd8\xfa\x20\x7c\x7b\x32\x48\x40\xd9\x01\xe7\x69\x59\x6c\xdc\x6d\xf7\x1b\x00\x00\xff\xff\xcf\x92\x30\x7f\x5a\x01\x00\x00") -func configDefaultConfigYamlBytes() ([]byte, error) { +func configGridengineTemplateTxtBytes() ([]byte, error) { return bindataRead( - _configDefaultConfigYaml, - "config/default-config.yaml", + _configGridengineTemplateTxt, + "config/gridengine-template.txt", ) } -func configDefaultConfigYaml() (*asset, error) { - bytes, err := configDefaultConfigYamlBytes() +func configGridengineTemplateTxt() (*asset, error) { + bytes, err := configGridengineTemplateTxtBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "config/default-config.yaml", size: 11543, mode: os.FileMode(436), modTime: time.Unix(1702316879, 0)} + info := bindataFileInfo{name: "config/gridengine-template.txt", size: 346, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _configGridengineTemplateTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x90\xcd\x4a\xc4\x30\x14\x85\xf7\x79\x8a\x6b\xc7\x59\x26\xed\x0b\xb8\xb2\x30\xb8\x71\x21\x82\x4b\x69\xc9\x0d\x13\x32\xf9\xe1\x26\x51\x30\xe4\xdd\xa5\x69\x11\x0a\x75\x76\x97\xc3\x77\x3e\xb8\xe7\xf4\xd0\xcf\xda\xf5\xf3\x14\xaf\xec\xf4\x08\xfc\x15\x4a\x11\xef\x53\x34\x2f\xb2\xd6\x96\xf8\x25\xf9\xf0\x64\x46\x4d\xb5\xf6\x2a\x3b\x87\x37\x1e\x93\xf4\x39\x35\x00\xff\x03\x90\x88\x95\xa2\x15\x38\x04\xf1\x1c\x72\x84\x01\x78\xad\xac\x94\x40\xda\x25\x05\xdd\x52\x0f\x08\x36\x68\x38\xcb\x6e\x85\x1a\xc0\x01\x9d\x6c\xd7\x56\x7f\x9b\xec\x65\x86\x41\x1c\x19\x6e\x70\xfd\xfc\xb2\x68\x9f\xce\x62\x50\x97\x6e\x83\x8f\x3d\xa3\x8e\xe6\xae\x48\x45\xfd\x83\x7f\xa6\x15\xdf\xa9\xd8\xfa\x20\x7c\x7b\x32\x48\x40\xd9\x01\xe7\x69\x59\x6c\xdc\x6d\xf7\x1b\x00\x00\xff\xff\xcf\x92\x30\x7f\x5a\x01\x00\x00") +var _configPbsTemplateTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\xd0\xc1\x4a\xc4\x30\x10\xc6\xf1\x7b\x9f\x62\xec\xb2\xc7\xb4\xf5\x2a\xf4\xa2\x05\xf1\x22\xa2\x82\xe7\x86\x4c\x34\xa4\x9d\x84\x49\x82\x87\x90\x77\x97\xdd\x04\x64\xc1\xf5\x16\x86\x3f\x3f\xc8\x77\xb8\x19\xa5\xa1\x51\xae\xe1\xab\x3b\xbc\xdc\xbf\x81\x78\x86\x9c\x87\xf7\x35\xd8\x27\x55\x4a\xbb\xb9\xd3\xed\xc3\xb1\x5d\x0c\x97\x32\xea\x44\x84\x9b\x08\x51\xb9\x14\x5b\x82\xd7\x12\x64\xee\x72\x36\x1a\x08\x61\x78\xf0\x29\xc0\x04\xa2\x94\x2e\x67\xcf\x86\xa2\x86\xbe\x02\x1b\x90\x53\x18\xe6\xdb\x3b\xef\x69\x3e\xaa\xbe\xd6\xe7\x52\x00\x92\x3a\xbf\x9a\xf3\xba\xee\x8f\x12\xa6\xe1\x1a\xb5\xe3\x3e\x1f\x87\x49\x7f\xca\xbe\xc5\x7f\x3b\x8b\x09\xf6\x5f\x48\x9b\x0d\x7f\xa5\x9a\x5f\x50\x5d\xfd\x29\x7c\x3b\xb6\xc8\xc0\x89\x40\x88\x78\x9a\x6f\xb9\x18\xf2\x27\x00\x00\xff\xff\x94\x91\x42\x0b\x69\x01\x00\x00") -func configGridengineTemplateTxtBytes() ([]byte, error) { +func configPbsTemplateTxtBytes() ([]byte, error) { return bindataRead( - _configGridengineTemplateTxt, - "config/gridengine-template.txt", + _configPbsTemplateTxt, + "config/pbs-template.txt", ) } -func configGridengineTemplateTxt() (*asset, error) { - bytes, err := configGridengineTemplateTxtBytes() +func configPbsTemplateTxt() (*asset, error) { + bytes, err := configPbsTemplateTxtBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "config/gridengine-template.txt", size: 346, mode: os.FileMode(436), modTime: time.Unix(1701431150, 0)} + info := bindataFileInfo{name: "config/pbs-template.txt", size: 361, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _configHtcondorTemplateTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x8e\xcd\x6e\xea\x30\x10\x85\xf7\x7e\x8a\x11\xd2\x5d\x26\x97\x17\xc8\xa6\x80\x10\x9b\x22\xd1\xa8\x3f\x2b\xcb\xe0\x49\xb0\xe2\x8c\x61\xec\x09\xad\xa2\xbc\x7b\x15\x40\xad\xa8\x4a\x77\x47\x3e\xdf\xf9\x3c\x42\xae\x43\x8e\x08\x05\x74\x86\x9c\xf7\x46\xd5\x98\x90\x3a\x28\xa0\x64\x41\x85\xef\xb8\x93\x64\xb6\x7e\x44\x2a\x21\x42\xaf\x0c\xd7\xd2\x22\xa5\x08\x05\x9c\x02\x37\xc8\xc0\x42\x90\x65\xc9\xc4\x66\x35\x87\xbe\xcf\xcb\x31\xd9\x61\x50\x3e\xd4\x50\x8c\x2f\x2f\x81\x9b\xb9\xe3\x61\xf8\xbf\x0b\x64\x03\x67\xd8\x21\xa5\xcc\x87\x5a\x21\x73\xe0\x9f\xd4\xe5\xaf\x2c\x26\x8b\xcc\x2a\x48\x3a\x48\xba\xcf\x04\x49\x2a\xee\x83\x78\xab\x13\x1b\x8a\x15\xb2\xae\x9c\xc7\xf1\xc4\xb7\xc5\x93\x3a\xed\x91\x74\x0a\xdf\xe5\x97\x70\xfd\xa8\x17\xaf\xab\x52\xaf\x37\x7a\xf1\xbc\x9a\x95\xaa\xef\x5d\x05\x84\x90\xcf\x0e\x12\x61\x0a\xd9\x30\xa8\xbe\x3f\xb0\xa3\x54\xc1\x84\xf1\x28\x18\x93\xde\x8d\x65\x01\xff\xec\xe4\x02\x9e\xa1\x0c\x90\xec\x39\x5d\x15\x1b\xd3\x2e\xb7\x30\xcd\xef\x59\x5a\x6c\x03\x7f\x8c\x9e\x7c\x5a\xc1\xf2\x61\x72\x9d\xfc\x6e\x9b\xbb\xd8\xfc\xa9\xb3\x2e\x36\x37\xb2\xcb\xe2\xc6\xa6\x8e\x82\x82\xea\x33\x00\x00\xff\xff\x61\xe0\x01\xde\xf9\x01\x00\x00") +var _configSlurmTemplateTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x90\xc1\x6a\xc3\x30\x0c\x86\xef\x79\x0a\x2d\xa5\x47\x27\xd9\x23\xac\x0d\x74\xbb\x6e\x85\x9d\x9d\x45\x61\x9e\x67\xd9\x48\x36\x3b\x18\xbf\xfb\x48\x53\x68\x0a\x0b\xbb\x19\xeb\xfb\x3f\xa4\x7f\xf7\xd0\x0e\x86\xda\x41\xcb\x67\xb5\x7b\x3b\x3c\x9d\x8f\xcf\xa0\xd4\x97\x1f\x14\x69\x87\x90\x73\x73\xd6\x62\x5f\xc6\x52\x56\x63\x8a\x5a\xac\xc0\xe3\xea\x0b\x99\x3d\xcf\xf8\xbb\x67\xdb\x1b\x2e\xa5\x9d\x12\x11\x7e\x2b\x89\x23\x32\xaf\x50\x9f\x62\x48\x71\x8b\xf5\x29\x56\x39\x9b\x09\x08\xa1\x39\x86\x24\xd0\x81\x2a\xa5\xca\x39\xb0\xa1\x38\x41\x7d\x33\x7d\x84\x24\x2a\x20\xab\x79\x1f\xd8\x8f\xf5\x92\xb8\xd0\x0a\x90\xc6\xcb\xeb\xea\x7a\xd5\xee\x34\x40\xd7\x6c\xeb\x1c\x3a\xd8\x37\xdd\x74\x3a\xd4\x57\xfc\x6f\x53\x6f\xc4\xfe\xa3\x8a\x2e\xdc\x54\x0b\x7f\xe7\xaa\x96\x83\xe1\xc7\xb3\x45\x06\x4e\x34\x87\xe6\xa6\xfb\xbb\xce\x7f\x03\x00\x00\xff\xff\x71\x9e\x5b\xbd\x9f\x01\x00\x00") -func configHtcondorTemplateTxtBytes() ([]byte, error) { +func configSlurmTemplateTxtBytes() ([]byte, error) { return bindataRead( - _configHtcondorTemplateTxt, - "config/htcondor-template.txt", + _configSlurmTemplateTxt, + "config/slurm-template.txt", ) } -func configHtcondorTemplateTxt() (*asset, error) { - bytes, err := configHtcondorTemplateTxtBytes() +func configSlurmTemplateTxt() (*asset, error) { + bytes, err := configSlurmTemplateTxtBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "config/htcondor-template.txt", size: 505, mode: os.FileMode(436), modTime: time.Unix(1701431150, 0)} + info := bindataFileInfo{name: "config/slurm-template.txt", size: 415, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -158,67 +157,67 @@ func configKubernetesExecutorTemplateYaml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "config/kubernetes-executor-template.yaml", size: 1100, mode: os.FileMode(436), modTime: time.Unix(1702337819, 0)} + info := bindataFileInfo{name: "config/kubernetes-executor-template.yaml", size: 1100, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _configKubernetesTemplateYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x54\xcb\x6e\xdb\x30\x10\xbc\xeb\x2b\x16\x0a\x7a\x94\xa5\x5c\x7a\xe0\xcd\x48\x82\xb4\x45\xad\x04\x45\x90\x3b\x45\xad\x62\xc2\x7c\x95\x4b\x39\x30\x0c\xfd\x7b\x41\x51\x6e\x2d\xbf\x0e\xe5\x89\xdc\x21\x67\x66\xd7\x63\x71\x27\xdf\xd1\x93\xb4\x86\x41\xc3\x83\x58\x97\xdb\xfb\x6c\x23\x4d\xcb\xe0\x87\x6d\x32\x8d\x81\xb7\x3c\x70\x96\x01\xdc\xdd\xc1\xe3\x0b\xd4\x2f\x6f\xf0\xf0\x6d\x59\x3f\x3f\x41\xbd\x5c\x3d\x65\x00\x86\x6b\x64\xb0\xdf\x2f\xde\x38\x6d\xbe\xb7\xc3\x30\xd5\xc8\x71\x91\x80\xfa\x70\x1a\x86\x8c\x1c\x0a\x06\x19\x40\xc3\xc5\xc6\x76\xdd\x4f\xa9\x65\x60\x50\x65\x00\xc2\x6a\xa7\x30\x48\x6b\x88\xc1\x7d\x06\x10\x50\x3b\xc5\x03\x46\x75\x80\xf1\xe5\xb8\x03\x20\xf4\x5b\x29\x70\x29\x84\xed\x4d\xa8\x47\x07\x5d\x6f\x0c\xaa\x82\xf8\x74\xc7\x23\x05\xee\xc3\xab\x55\x52\xec\x18\xd4\xb8\x45\x3f\x41\xc2\x9a\xc0\xa5\x41\x4f\xa3\x95\xb4\x8a\xa9\x93\x89\xe7\xd3\xfa\x0d\xfa\x62\xde\xd7\x61\x49\xcd\x3f\x90\x81\x5d\x53\x1f\x5d\x37\xd2\x96\xd3\xb3\x56\x9a\xb6\xf0\xd6\x06\x85\x44\x2c\xba\xa7\x70\xfa\xf0\xb5\x57\xea\x60\x6b\xa9\x3e\xf9\x8e\x8e\x6e\x70\xff\x41\xec\xe8\x1c\x8d\xe5\xc9\x4c\x7e\x5a\xf6\xbd\x39\xab\x15\x85\xb0\xa6\x93\x1f\x67\x40\x89\x41\x94\x09\x2b\xe7\x3d\xa6\xe2\x62\xa7\xd5\x05\xb6\x10\xbb\x7f\x3c\x05\x2e\x8f\xc5\x23\xd9\xde\x0b\x3c\x69\x20\x02\xbf\x7b\xa4\x70\x56\x07\x10\xae\x8f\x19\x91\x1d\x18\x84\xc5\x83\xeb\x09\x2a\x28\x86\x61\xbf\x1f\x0f\x71\x03\xa8\x08\x21\xee\xf2\xfb\xaa\xd2\x79\xdc\xa1\x99\x2b\xa7\xa5\x51\x5b\xbf\x3b\xe2\xfb\xc5\xf5\x73\x03\xd5\x62\xa2\x74\x5e\x9a\xd0\x41\xfe\x65\x51\x75\xcf\xf9\x04\x8f\x74\x8a\x30\x09\x7c\x5d\xdd\xe0\x47\xb7\x46\x8d\x9e\xab\x82\x82\xf5\x63\x04\xfe\x4a\x3d\x4a\xda\xdc\xd2\x4a\xf8\x5c\xac\xaa\x2e\xab\x6d\xad\xea\x35\xae\x62\xb6\xcf\xb2\x30\x0b\xe9\x64\xe3\x4a\x4a\xc7\x91\x44\x92\x57\x1e\xd6\x0c\x4a\xeb\xc2\xf4\xcb\x1f\x07\xa0\x68\xa5\x2f\xaf\x13\x50\xdf\xa4\xe7\xd7\xae\x1c\x2c\xa5\x14\x15\xc9\xfb\x0d\x17\xff\x62\x98\x65\xc7\xed\x5e\xfa\x2f\x5e\xe3\x4c\xf5\x15\x77\xf3\xe9\xcc\x66\x33\x69\xfc\xd7\xe4\x5c\xfc\x26\x52\x40\x13\xde\x47\xe9\x07\xc5\xa5\x9e\x6b\x89\x58\x4a\x5f\x9e\x03\x97\xdb\x0a\xf8\x13\x00\x00\xff\xff\x57\x40\xab\x27\x51\x05\x00\x00") +var _configDefaultConfigYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\xdd\x6f\x1b\x39\x92\x7f\xef\xbf\xa2\xce\x9e\xc5\x26\x80\xbe\x3c\x83\xd9\xbb\x15\xe0\x07\x7f\x4d\xe2\x8d\x93\xe8\x2c\xe5\x72\xf7\x14\xb0\x9b\xd5\x6a\x8e\xba\xc9\x1e\x92\x2d\x45\xc9\xe5\x7f\x3f\x54\x91\xfd\x21\xdb\x99\x64\x76\x1d\x20\xc0\x4d\x5e\x62\x91\xc5\x62\xb1\xbe\xf8\xab\x62\x1f\xc3\xaa\x40\xd0\xa2\x42\x30\x39\xf8\x02\x41\x64\x5e\x6d\x11\x1c\xda\x2d\x5a\x90\xc2\x8b\x54\x38\x84\x54\x64\x1b\xd4\x32\x39\x86\xb3\xad\x50\xa5\x48\xcb\x6e\xcc\xcd\x21\x35\xa5\x97\xe9\x08\x52\x21\xd7\x68\x47\xbc\xcc\x79\x63\x71\x04\x72\xaf\x45\x65\x68\x12\x4b\xe1\xbc\xca\x46\x50\x19\xbd\x36\x32\x4d\x2e\x23\xf3\x76\x7d\x92\x7c\x56\x9c\xcc\x54\x75\xe3\xbf\x24\x46\x69\x32\x51\x8e\xa0\xf0\x99\xd1\xd2\xd8\x11\xb8\xb2\xb1\xd5\x08\xea\xd4\x8d\x60\x6d\x95\x44\xbd\x56\x1a\x47\x50\x09\xdd\x10\xa5\xd8\xb9\x71\x2a\x7c\x56\x24\x17\x61\x83\xc8\xe3\x77\x24\xc1\x2d\x6a\x0f\x3b\xab\x3c\xda\x76\xeb\x27\xee\xe9\xe4\xb3\x22\xad\x47\xff\x9c\x7a\x46\xb0\x11\xf9\x46\x24\x57\xb4\xe1\x5b\xde\xcf\xcd\x13\x80\x71\xab\x2d\xfa\xb3\x34\xeb\x24\xb9\x31\xeb\x35\x5a\x9a\x3b\x06\xfa\x5b\xe9\x35\x94\xb8\xc5\xd2\xcd\x41\x62\xda\xac\x47\xa0\x74\x6e\x46\x80\xd6\x1a\x9b\x00\xdc\xd0\xe4\x9c\x07\x79\x11\x73\x27\x5e\x0e\xbc\x01\x5f\x28\x07\xb5\xf0\xc5\x04\xae\x73\xc0\xaa\xf6\xfb\x51\x98\x14\x16\xf9\xe4\x1e\x35\x11\x3a\x2f\xd1\xda\x49\x02\xf0\xba\xf1\x75\xe3\x7f\x51\x25\xce\xe1\xe8\x28\x49\x96\xec\x3d\x41\xa2\xe7\xc6\xf9\xa1\x1e\x7f\x69\xb4\xc6\x32\x3a\x18\x2d\x26\x82\x57\xa2\x6a\x75\x5f\x18\xe7\x13\x5e\xb9\x30\xd6\x43\xe3\x50\x42\x6e\x2c\x3c\x5f\xad\x16\xe4\x07\x55\xa3\x55\x26\xbc\x32\x1a\x84\x96\xcc\x72\x87\x29\x48\xe1\x8a\xd4\x08\x2b\x99\xe5\x6a\xb5\xa0\xd5\x73\xf8\x8f\xd9\x6c\xf6\x10\xb7\xdb\xc5\xc5\x21\x33\x5a\x76\xbb\xb8\x08\xab\xfe\x3e\xfb\x7b\x5c\x75\x8b\xbf\x35\xca\x92\x45\x9d\xca\x40\x34\xbe\x40\xed\xdb\xfd\x89\x11\xed\x1f\x83\xe5\x6c\x71\xed\xa0\x71\xa4\x7e\x01\xb5\x70\x6e\x67\x82\x38\xc7\xa4\x48\xda\x9a\x3c\x6f\x83\xe0\x1a\x8b\xa4\xc0\xda\x9a\x1a\x6d\xb9\x07\x8b\xce\x5b\x95\x79\x10\x59\x86\x2e\x5a\x81\xbc\x5e\xe7\x6a\x0d\xb9\x2a\x91\xb9\x3c\xc1\xc9\x7a\x02\x59\x51\x19\x09\x7f\x9b\xcd\x20\x67\x55\x4e\x02\xd9\x64\x5f\x95\x4f\x99\xec\x9c\x64\x3d\x6b\x7c\x11\x0c\x40\x7e\xf2\xc6\xa1\x9d\x93\x08\xf6\x24\x8e\x01\x2c\xa2\x84\x73\x10\x69\x76\xf2\xe3\x4f\x0f\x10\xff\xf8\x00\x71\x6e\x4c\x2a\xec\xa1\x76\xce\x51\x58\xb4\xf0\x8f\xb7\xab\xaf\x50\x51\xd0\x48\x70\x11\xd8\x19\xfd\x57\x0f\xa5\x68\x74\x56\xc0\xae\x40\x1d\x0f\xdd\xd8\xb0\xfe\xcd\xed\x0d\x64\x42\x6b\xe3\x21\x25\x17\x15\x12\xa3\x4a\x5f\x2b\x79\x70\xc8\x63\xa6\x8d\x4e\xf6\xfa\xfa\xf2\x82\xf7\x54\x19\x1e\x72\x6c\xc9\x97\x61\xf2\x82\xe7\xde\xd8\x92\x1d\xb7\xe5\x74\x51\x2a\x8a\xf2\xeb\x4b\x76\x31\x87\x99\x45\xcf\xde\xef\x38\xf8\x95\x2f\x78\x17\x6f\x36\xa8\x41\x69\x6f\x8d\xab\x31\x63\x81\x2d\xfe\xd6\xa0\xf3\xd0\xf1\x7a\x72\xfe\x80\xeb\x3c\x6d\xc5\x08\x3b\x5d\xcb\xc3\xdf\x4b\xde\xb1\x3f\xd9\xeb\x9a\x16\x09\x8a\xd9\x1c\x68\x2b\x95\x2b\xf2\x26\x0e\x55\x97\x99\x1a\x61\x2b\xca\x06\xa1\x6a\x1c\x2b\x4a\xe9\x5e\xc0\x96\x4d\x34\xd6\x92\xc8\xbf\x92\xb5\x68\xa4\x42\x9d\xfd\x01\xee\x67\x71\xc5\x3c\x38\xc8\xb5\xce\xca\x46\x22\x08\x38\xba\x10\x59\x81\xe3\x0b\x43\xda\x2a\xe7\xa0\xcd\x98\x53\xe0\x51\x08\xec\x02\x85\x44\x4b\x9c\x9f\xa1\x9f\xde\x28\xe7\x29\x28\x6a\xa3\x1d\x3a\xe6\xc4\xe1\x12\x92\x6f\x26\xb2\x82\x82\x2c\xdd\x93\xee\xd1\x56\x28\x95\xb0\xfb\xd6\xde\xec\x60\x97\xca\x51\x26\x26\xde\xbc\xf1\x1c\xbc\x6d\x30\x49\x6e\x17\x17\x41\xc5\x41\x6e\x4a\x03\xd1\x35\x85\x94\x16\x1d\x6d\x16\x5c\xf3\x2c\xfc\x1e\x64\xa5\x79\x9f\x16\x2e\x2c\x4a\xb2\xa6\x28\x1d\xbb\xf8\x43\x36\xfe\x5e\xd3\x43\x08\xef\x30\x19\x32\xe3\xdd\x44\xc0\xa3\x99\xd1\x3a\xfa\xb4\x57\x15\x9a\xc6\x93\xac\xab\xf0\xe7\x1c\xfe\x36\x73\x81\x8e\xee\xc9\x4a\xbc\x57\x55\x53\x81\x6e\xaa\x14\x2d\x07\xa1\xaa\xd0\x81\x2f\x84\x07\xd1\xc5\xc4\x4e\x95\x25\xf9\x8f\x45\x6f\x55\x4c\xc4\xb9\x50\x65\x63\x31\x66\x05\x62\x0f\x29\xfa\x1d\xa2\x8e\x64\xa4\xe0\xb2\x34\x3b\x07\x42\x03\xbe\xaf\x8d\x0e\x8a\xe7\x4b\xd6\xe4\x39\x38\x2f\xac\x67\xad\x7a\xf8\x99\x82\xd5\x68\x19\x7c\xa6\xa9\x49\x55\x27\x50\x29\xdd\x78\xd2\xd1\x4b\xf1\xfe\x36\x30\x9d\xc3\xc9\xac\xbd\xe5\x5d\x56\xa0\x6c\x4a\x72\x3f\xd7\xdf\x10\xa4\xe1\x97\x8c\x13\xee\xa2\x8f\x49\xb2\x6c\x57\xb4\x57\xdc\x0e\x4c\x1e\x6f\x45\xdb\x68\x10\x43\x9e\x1e\x6d\x77\xc3\xb4\x0b\x6f\x05\x61\x8d\x13\xd7\x2d\xaf\x84\xde\x83\x17\x6e\xc3\xd6\x6d\x57\x53\x3c\x18\x8d\x0f\xf3\xb8\x28\x1a\xbd\xe1\x73\xb4\x4c\x4a\xa3\xd7\xb4\x7c\x27\x94\xef\xb4\xd8\xd4\x52\x78\x74\x90\x62\x6e\x2c\x99\xca\x6e\x82\x0b\x6a\x23\x11\x24\x0a\xf6\xc1\x57\x46\xe2\x42\xe9\x75\x67\xdf\x93\xea\x61\xb6\xa4\x9a\xb8\x96\x21\x80\xb0\x7e\x74\x97\x37\xa9\xee\x1e\xf7\x6b\xad\x7c\xc7\xfd\xe7\x2a\x49\x68\x70\xde\xba\x7f\x84\x19\x91\xf3\xf5\x65\xe7\x2b\xa2\xf1\xa6\x12\x14\x53\x65\xb9\x87\x35\x6a\xd2\x44\xb8\x03\xae\x2f\x03\xda\x88\x2c\xba\x5d\x0b\x41\xa7\xa5\xcc\x2c\x4b\x64\x81\xe9\x04\x48\x26\x15\x31\x73\x05\x39\x46\xa0\xa2\x53\xba\xa2\xf1\x20\xcd\x4e\x07\x37\x1c\x9f\x40\x85\x42\x93\x03\xa3\x45\x72\x0b\x6d\xba\x28\x80\x59\x3b\x19\x06\x40\x55\x9c\x81\x3c\x96\x7b\x10\xb9\xc7\xe0\x3b\xb9\xb2\xce\xb3\x49\x0f\xe2\x66\x7c\x12\xe3\xe6\x8c\xb5\x12\xb6\x3f\x3c\xa4\xb7\x7b\xd2\xad\x44\x8f\x99\x87\x1d\xc5\x90\x45\x67\x1a\x9b\x61\xc0\x60\xa2\x03\x9a\xde\x80\xf2\x41\xe6\x4b\xcc\x95\x26\xed\xdf\x76\xb4\x31\x4f\xf3\x3e\x87\xd7\xaa\xd9\xa2\x25\x3c\xec\x42\x9e\x4f\xb1\x10\x5b\x65\x18\x8e\x75\xcb\xc9\x36\x9c\xeb\x16\x6f\x5c\xbf\xe5\xa4\x1d\xad\x1b\x37\x07\x4e\x87\x9c\x48\xcf\x5e\xf6\x34\x23\xce\xe3\xe7\x2d\xe9\xad\xa8\x9e\xa5\x73\x98\x4d\x3a\xea\x4b\xe5\x36\xe0\x6a\x91\xe1\x67\x17\x11\xc9\x60\xd5\x31\xfc\xc2\x76\xdc\x8d\x19\xd9\x82\x6f\xe8\xac\x93\xfb\xe1\xe7\xf6\x3a\xeb\x6f\xe8\x7b\x60\xf3\x0d\x47\x43\x08\xbf\x9f\x5d\x92\xbc\x35\x76\xd3\x86\x31\xe1\x57\x07\x99\x45\x72\x30\x90\x8d\x25\x6d\xd6\xd6\x50\xce\xa5\x3f\x5b\x97\x6c\x21\x30\xab\x57\x39\x90\xca\x62\xe6\x8d\xdd\xd3\x06\xc4\xf0\x52\xd9\x39\x4c\xa6\x21\xc5\x8e\x77\xc6\x6e\xc6\x52\xd9\x3f\x74\x8c\xda\x94\x25\xbb\x6e\x26\x74\x46\x27\x50\x6b\x2d\x4a\xca\x17\x0b\x53\x96\x4a\xaf\xfb\x23\xfc\x11\xe5\x20\xc1\x19\x2f\x4d\xe3\xa7\x68\x2d\x7b\x27\x41\xfb\x2e\x49\xc4\x9b\xe5\x9e\xda\x08\xaf\x79\x1f\x62\x5b\x31\xd9\x2c\xa8\xc3\xa2\x6b\x4a\x1f\x3d\xcd\x91\xd7\x63\x29\xc9\xa1\x88\x36\x70\x95\x94\x0e\x95\x5e\x97\x21\xee\x98\x5b\x1f\x26\xf8\x1e\xb3\xc6\x1b\x0b\xf8\x5e\x79\xbe\x05\x6e\xcc\xfa\xae\x95\x68\xc9\x4b\xf1\x1e\xd2\x7d\x14\x92\xa1\x03\xeb\x67\x70\x9a\x16\x96\xc4\x43\x45\x5e\x2b\xa1\xca\xa5\xfa\x40\xe9\x76\x36\x9b\xcd\xe0\x18\x4e\x66\xf0\xe2\x3c\x30\x7d\x65\x6c\x15\x62\x8e\xca\x08\xf6\x05\x90\x58\x22\x6d\xa3\xbc\xe3\x21\x3a\x49\x67\xe2\x28\x79\x90\xba\x53\xf2\x8a\x94\x62\x18\x49\x81\x0c\xc8\x23\x5e\x7e\xc3\xc8\xba\x41\xb1\xc5\xce\x3f\x72\x51\x3a\x0c\x52\xdc\xa8\x4a\xf9\x90\xbf\xba\x0b\x34\x33\x3a\x6b\xac\x25\xbc\x43\x79\x89\x90\xaf\x9b\x36\x35\xff\x1f\x6e\xb2\x85\xb0\xa2\x2c\xb1\x5c\x59\xa1\x5d\x4e\xd5\x61\xb8\xd3\xc6\x8f\xfb\x2f\x39\x86\xb6\x50\xa7\x2b\x58\x4e\x8d\x05\xae\x49\x21\x16\xa5\xd3\xe7\x42\xcb\x12\xad\x7b\xfc\xad\x93\x73\x53\xfa\xcb\xf3\x79\x84\x29\x14\xd4\xc1\x41\xbb\xbe\x44\x04\x3f\x34\xf7\x40\xc8\xc5\xdf\x13\x99\x26\xc9\x25\x57\xda\x2d\xb3\x73\xe1\x90\xab\x52\x6f\xe8\xca\x67\x57\x6a\x6b\x71\xf0\x6c\x40\xca\xda\xf4\x47\x4b\x7a\x80\x99\xce\xde\x2e\xc1\xe2\x5a\x19\xcd\x29\x93\xfe\xe8\x2a\x08\x9a\x3b\x0b\x48\x6d\x83\x7b\xb8\xbe\x4c\x00\x5e\xe0\xfe\x60\x3e\x20\xfc\x96\xec\x05\xee\x19\x77\x32\xea\xe7\x3b\xed\x2a\x74\x03\xe2\xc9\x2d\xe6\xea\xfd\x50\x54\xa5\x25\xbe\x47\x07\x4f\xc8\xd9\x47\xa1\x29\xe1\x46\x7c\xfd\x39\x42\x79\xd7\x34\x1f\x96\x1d\x88\x3d\x28\x91\x62\xbf\xc1\xa1\xb0\x59\x31\xcc\x90\xb7\x37\x73\x28\xbc\xaf\xe7\xd3\xe9\x00\xfa\xfe\x38\x63\xbc\xf4\xcc\x18\x0a\xe4\x8b\xd2\x34\x92\xfd\x22\x44\x22\xc7\x5c\x6b\x94\x49\xd2\x4d\x90\xfc\x0b\x6b\x7e\xc5\xcc\x77\xc7\x6f\xed\x28\xb2\xcc\x34\x04\xe7\x87\x58\x5a\x85\x1b\xa6\xaf\x4b\xb8\x09\x51\x1b\xe7\x14\xdf\x11\x43\xe2\x87\x21\x82\x54\x2e\xa3\xeb\x0d\x25\xf3\xc9\xad\xa9\xc2\x79\xf5\x56\x59\xa3\x2b\xd4\x7c\x61\x0e\x10\x7c\xdf\xb7\x78\x69\xf4\xba\x73\x11\x2a\x00\x1c\x14\x86\xf2\x19\x37\x80\x42\x41\x80\x6e\x00\xec\x51\x46\xcd\x71\xe6\xe2\x15\xe1\xda\x1c\x0f\x9a\x19\x7c\x9d\xb5\x0e\xab\xdc\xa1\x03\xb3\x13\x32\xe8\xa4\x4b\x4b\x69\x88\x32\x0c\xb2\x5c\x48\xc6\xb4\x82\x2b\x9b\xae\x6b\x36\xb0\xeb\xaa\x85\x22\x51\xd4\x8a\x35\x1b\x71\xf8\x1d\xec\x16\xcb\x11\x82\xaa\x5c\x61\x49\xae\xbb\x83\xb2\x18\xb3\xb4\xc8\x9f\x50\xa2\x96\xc0\x95\x0c\x21\x70\xc2\xd3\x54\x91\x30\x84\xe8\xd0\x85\xa3\xdb\xd1\x68\xb2\x53\x28\xd4\x7a\x51\x3e\xa0\x35\xa3\x50\xaa\x88\xb2\x84\x4a\xec\x21\x2d\x4d\xb6\x21\x41\x90\xab\x7f\xa1\x78\x9b\x20\x58\x5f\x71\xb4\x15\x5f\x8a\x80\x8e\xa2\x51\xb9\x22\x60\xbe\x21\x82\x6c\x8b\x19\x56\x21\x49\xda\x16\x32\xdc\xd9\xb2\xc1\xec\xd9\x9d\x4a\x8d\xc6\x94\x56\x5c\x41\x1c\xd6\x6b\xcc\x4f\x12\xdc\x36\xfa\xd0\x46\x92\xa0\x15\x4a\x2a\x38\x69\xfc\xb2\x4f\x3e\x58\xb2\x54\xad\x14\xd1\xc7\xfb\x82\x8a\x9c\xea\x85\xc8\x37\x62\xde\xd5\x95\x9d\x83\x30\xe9\xca\xd4\x2a\xeb\x4c\xf9\x2d\x92\x77\xec\x6c\xc2\x79\xec\x49\x7e\x83\x2c\xfd\x7c\x75\xc1\x0d\xd7\x10\x37\xab\xc6\x6a\xa0\xc2\x8c\x93\x82\xf3\xc2\x53\xc5\x47\xf7\x99\x2a\xd1\x4e\xe0\x6d\x81\x1a\x50\x53\x6a\x95\xa3\x16\x6a\xf4\xbd\x38\x74\x3d\x7c\x7b\xbe\xb8\x60\x96\x7d\x35\xe5\x0d\xe4\x4a\xcb\xb6\x54\xe2\xfa\xd2\x22\x38\xdf\x64\x1b\xf2\x48\x01\xbf\x35\xd8\x50\x58\xf2\xbe\x84\x2b\xac\x35\x96\x40\x88\x96\xb1\x28\x8c\x50\xa7\x85\x0a\x81\x92\xb2\x91\x95\x04\x53\xf6\x83\xfe\xc1\x6d\x27\x77\x6c\x20\x84\xae\x57\x1c\x24\x80\x42\x7e\x5e\xf4\x18\xab\xb8\xd7\xab\xe6\xdf\xc2\xa2\x0b\x1b\x71\xdc\x84\x43\xff\xd5\x75\xfd\xec\xe8\xef\xbe\x30\x8e\x94\x55\x1b\xeb\x7b\x7f\xeb\x89\x0e\x76\xa6\xeb\x9e\x82\x60\x85\x55\x5d\x0a\x8f\x5d\x1a\xeb\x87\xe6\xf0\xbf\xec\x6c\x8d\x56\xe4\x79\x08\xa7\xb0\x15\x5a\x95\xa5\xe0\xe1\x35\x7a\xd4\x5b\x38\x85\x55\x38\x1a\x44\x5c\xc3\xa5\xc5\x29\x7c\xfc\x38\xb9\xea\x7e\x7f\xfa\xc4\x04\xc2\xae\x1b\x4a\xa1\x0e\x4e\x5b\xbc\x44\x05\xef\x78\x1c\x9b\x11\x1f\x3f\x4e\x42\x4b\xed\xd3\x27\x18\x8f\x49\xbf\x63\x25\x69\x74\x25\xdc\xe6\x5a\x46\x2e\x04\x39\x99\x7f\x44\x43\x9f\x3e\x4d\x43\xcb\x7e\xcc\x37\xd9\xb8\x34\xeb\x20\x0e\xd9\xee\x2e\x65\xbc\xe3\x43\xf7\x99\xc9\x0c\xb7\x9f\x3f\x4f\x67\x1a\xcf\x74\xae\x30\x4d\x29\xdf\xf9\x08\x98\xde\xe5\x0c\xf8\x4f\xe1\x7f\xae\x96\x3c\x4f\x79\xf0\x9d\x37\x3d\x41\xc7\xf8\xf5\xab\x77\x57\xff\x7d\xbd\x7a\xf7\xfa\xf6\xdd\xd5\x7f\x5d\x5f\xac\x98\xfc\xe3\x47\x95\x83\x46\x98\x50\x2d\x04\x33\x18\xc7\xd3\x7d\xfc\x58\x5b\xa5\x7d\x0e\x47\xb1\xf1\xf1\x2e\x23\x82\x53\xf8\x8b\x3c\x0a\xc4\x1d\xe1\x18\x50\xcb\xee\x57\x64\xc7\xf5\x12\x15\x3e\xbf\xc3\xb1\xc2\x8a\xd0\xe8\x29\xfc\x65\x32\xcb\xe1\xd9\xf9\x51\x5c\xf6\xfb\x9c\x43\x51\xf5\x05\xd6\x92\x8a\xb3\x21\xe3\xb0\xea\x1e\x67\xfe\xc9\xd1\x96\x24\x8b\xf3\xe5\x9f\xc1\xff\x9d\x06\xff\xf1\xbf\xa5\x4a\x4f\x53\xe1\x8a\xf0\x73\x71\xbe\x84\xf1\xab\x7b\x31\x19\xc6\xcd\x97\x62\x28\x90\xe1\x97\x42\xf2\xcb\xb1\x11\x18\x95\x01\xb3\x9e\x9e\xcc\xeb\x5a\x9f\x3e\x42\x80\xb4\x6c\x2b\xac\x4e\xc9\x85\xd7\xe9\x23\x84\x46\xcb\x94\x12\x46\xcf\xf5\xf7\xe2\xe2\x4e\xee\xfc\xca\x5c\x79\x7d\x79\x60\x96\xe4\x99\x55\xf2\x8a\xdf\x2c\xe7\xff\x9c\xad\x7f\x78\xd0\xd2\x3f\x7c\x8d\x9d\x7f\xf8\x0a\x2b\x13\x51\x67\xc1\xaf\xb5\xfb\x0f\x30\xae\x11\xaa\x5a\x3d\x46\x3e\x0c\x12\x14\xef\xb6\xad\xbd\x9f\x3d\x86\xb9\x23\xd3\xdc\xa9\x0f\xd8\x71\xfd\xf6\xe6\x5e\x96\x8d\xad\xfe\xcc\xa3\xdf\x6d\x1e\x9d\x1e\x06\xd7\xf2\xfc\x6c\x75\xf1\x1c\xc6\xe3\x5f\x4d\x3a\xe6\x22\xe4\x5e\xa4\x75\x24\x3a\xe8\xfa\xe4\xce\x70\x00\x38\x5f\x8a\xb2\x8e\x3c\xe2\x91\x2f\x84\xee\x57\xc4\x60\xc7\x91\x90\xc9\xb8\x46\xcb\xfe\xf8\x28\x01\xd9\xb1\xae\xb0\x62\x10\xf1\x28\xe0\xa4\x67\xeb\xab\xba\x67\xfb\xed\x63\x92\xdb\x35\xe7\xc2\x67\x05\x48\x74\x99\x55\x69\x74\xfb\xc3\x86\x7a\x5b\x5a\x9e\xbd\x5d\x42\xa0\xbe\xf7\x68\xd4\xf2\x79\xd4\x00\xef\xf6\x6b\xbd\xff\x6e\x60\x6b\x2e\xb4\xf9\x9d\x26\xc4\x6f\x1f\xbb\xdf\x7d\xdc\x0e\x0f\xf7\x60\xd4\x1e\xc3\x3f\x4c\x1a\x1e\x3e\xd8\x0a\x99\xd0\xdc\x33\x50\xbe\x40\x7e\xa6\xe2\xef\x4e\xa2\x65\x2a\xf1\xc1\xe8\xee\x79\x03\x5e\xd1\xdc\x93\xb3\xdb\x57\x4f\xe9\xc8\x07\x7c\xe6\x70\x14\xa3\x8a\x22\x5b\x62\x7e\xd4\xee\xf5\x9f\x94\x17\xff\xb5\x6d\x98\xc5\xe1\x0e\x9c\x6d\x8f\xee\xf4\x15\xdb\x3e\x5d\xf7\x26\x0f\xbf\x9a\x34\x24\xe6\xf0\xe1\x8b\x89\x4f\x15\x4c\x45\x73\xb2\x57\x84\xba\xd7\x96\xec\x1b\x90\xc3\x36\xe3\x31\xbc\x68\x52\xb4\x9a\x1b\xde\x5f\xe3\xdf\x03\xf2\x7b\x0e\xde\xcf\xcd\xbb\x97\xe1\xae\xbd\xcf\x2d\x2e\x6f\xe2\x40\xb8\x35\xdc\x64\xf0\xcd\x54\x4b\xe9\xe6\x20\x4d\xb6\x41\x3b\x82\x4d\xc7\x30\x01\xb8\x8a\xf3\x73\x38\x0a\xf3\x47\xf0\x98\x81\xf4\x62\xb8\xd7\x83\x91\xf4\xff\xfd\x8a\x3c\xf0\x15\x72\xeb\xf0\x80\xe7\x0d\xb8\x5a\xec\x34\xb9\xa0\x8b\x4d\xcc\x04\x7a\x82\xae\xef\xfb\x52\xb8\xf0\xcd\x1c\x65\x47\xf2\x57\x1f\x2f\xd8\x09\x2c\x11\x43\xcf\xd9\xcd\xa7\xd3\xde\xea\x13\x65\xa6\xd2\x64\x6e\x6a\x31\x47\x8b\x3a\xc3\x69\xf7\x00\x3c\x20\x1b\x8b\x5a\x4d\xb7\x27\x93\x93\x7f\x9f\x1e\x53\x38\x6d\x4f\xe2\x47\x7d\xc3\x3b\x3c\x0a\x31\xbc\xe7\xdb\x6e\x69\x3d\x78\x58\xa8\x82\x90\x07\xe2\x3d\x04\x0f\xc2\x57\x20\x87\x6f\xaa\xf9\xdd\x08\x69\x5d\x7a\x92\xb4\xf9\xa3\x63\xda\x7f\x67\xd0\x3d\x25\x75\x9e\xc2\xbd\xe4\xd6\xdd\xef\x9d\xe0\xee\xc4\xe7\x4e\xd2\x45\xde\xf0\x1c\x0f\x2d\x8e\x99\xe0\xb1\xbb\x82\xc7\xb0\xf4\xc6\x8a\x35\x7e\x83\x86\xe3\xf1\xbf\xf0\x28\xf0\xb9\x27\x81\xe4\x18\x6e\x4c\x26\x42\x91\x07\x6e\xef\x3c\x56\x93\x84\x87\xe2\x41\x42\x56\x7b\x5b\x28\x8f\xa5\x72\xdc\x5e\xe7\x26\xff\xe0\x75\x90\x0c\xe0\x60\x57\xa8\xac\x68\x53\x8d\x72\x20\xca\xd2\xec\x42\xfa\x0b\x5f\xf0\xf0\x63\x41\x18\xbc\x54\x7d\x47\x78\x32\x25\x29\x9e\xaf\x56\x8b\xb8\x63\xf7\x41\x8a\x37\xdd\x2b\x20\xd4\x4d\x5a\xaa\x0c\x42\xf3\x2a\xb6\xaa\x77\x98\xc2\x56\x09\x10\xf0\xec\x6a\xd5\x7e\x6f\x33\x49\x06\xac\xe6\x07\xef\x04\xe4\x78\x14\x6f\x4f\xdc\xd3\xe1\x0a\x77\xd0\x62\xff\x69\xe6\x92\x24\xdc\x67\xcb\x9f\xe6\x7d\xb2\x92\xed\xe3\xe5\x23\x7f\xfe\x73\xe7\xeb\x9c\xc7\x7a\x4a\xeb\xe3\x14\xf9\x45\x85\xf4\xda\x7e\xa0\xcb\x32\x2c\x7f\x82\xda\x9a\xad\x92\x68\x1d\xb8\x26\x2b\x40\x38\x78\xa9\xb4\x32\xed\x7b\xe7\x05\xd6\x45\x72\x0c\xcf\x28\xf9\xa8\x8c\x94\x11\xbe\x94\xec\x15\xc2\x49\x3b\x7c\x2a\x79\xa5\x65\x6d\x94\x0e\xbb\x87\xa1\x56\xe4\xf0\x6b\x28\x5c\x78\x4f\x1b\xd8\xe8\x21\x1d\x7f\xc7\x2f\x66\xcb\x9d\xca\xfd\xc3\x72\xbf\x71\x68\x5f\x7d\xe6\x51\x04\xe0\xac\xf1\x05\x3f\x35\xc6\x5a\x4b\x0b\xed\x07\xd4\x61\x20\x7e\xe1\xd3\x42\x99\xc1\xfc\x31\xfc\x3c\x9b\xc1\xcb\x73\x92\xab\x68\xf4\x66\xa9\x3e\xe0\xf9\x9e\xa0\x07\x4d\x84\x7f\x49\xf2\xcb\x81\xfb\xdf\x17\xb1\xff\xda\x69\xe6\xa2\xc4\x73\x38\x12\xda\xe8\x7d\x65\x1a\x77\x47\xec\xc1\xf8\xff\x05\x00\x00\xff\xff\x5a\xbf\xb8\x99\x38\x2f\x00\x00") -func configKubernetesTemplateYamlBytes() ([]byte, error) { +func configDefaultConfigYamlBytes() ([]byte, error) { return bindataRead( - _configKubernetesTemplateYaml, - "config/kubernetes-template.yaml", + _configDefaultConfigYaml, + "config/default-config.yaml", ) } -func configKubernetesTemplateYaml() (*asset, error) { - bytes, err := configKubernetesTemplateYamlBytes() +func configDefaultConfigYaml() (*asset, error) { + bytes, err := configDefaultConfigYamlBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "config/kubernetes-template.yaml", size: 1361, mode: os.FileMode(436), modTime: time.Unix(1702337830, 0)} + info := bindataFileInfo{name: "config/default-config.yaml", size: 12088, mode: os.FileMode(384), modTime: time.Unix(1708006685, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _configPbsTemplateTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\xd0\xc1\x4a\xc4\x30\x10\xc6\xf1\x7b\x9f\x62\xec\xb2\xc7\xb4\xf5\x2a\xf4\xa2\x05\xf1\x22\xa2\x82\xe7\x86\x4c\x34\xa4\x9d\x84\x49\x82\x87\x90\x77\x97\xdd\x04\x64\xc1\xf5\x16\x86\x3f\x3f\xc8\x77\xb8\x19\xa5\xa1\x51\xae\xe1\xab\x3b\xbc\xdc\xbf\x81\x78\x86\x9c\x87\xf7\x35\xd8\x27\x55\x4a\xbb\xb9\xd3\xed\xc3\xb1\x5d\x0c\x97\x32\xea\x44\x84\x9b\x08\x51\xb9\x14\x5b\x82\xd7\x12\x64\xee\x72\x36\x1a\x08\x61\x78\xf0\x29\xc0\x04\xa2\x94\x2e\x67\xcf\x86\xa2\x86\xbe\x02\x1b\x90\x53\x18\xe6\xdb\x3b\xef\x69\x3e\xaa\xbe\xd6\xe7\x52\x00\x92\x3a\xbf\x9a\xf3\xba\xee\x8f\x12\xa6\xe1\x1a\xb5\xe3\x3e\x1f\x87\x49\x7f\xca\xbe\xc5\x7f\x3b\x8b\x09\xf6\x5f\x48\x9b\x0d\x7f\xa5\x9a\x5f\x50\x5d\xfd\x29\x7c\x3b\xb6\xc8\xc0\x89\x40\x88\x78\x9a\x6f\xb9\x18\xf2\x27\x00\x00\xff\xff\x94\x91\x42\x0b\x69\x01\x00\x00") +var _configHtcondorTemplateTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x8e\xcd\x6e\xea\x30\x10\x85\xf7\x7e\x8a\x11\xd2\x5d\x26\x97\x17\xc8\xa6\x80\x10\x9b\x22\xd1\xa8\x3f\x2b\xcb\xe0\x49\xb0\xe2\x8c\x61\xec\x09\xad\xa2\xbc\x7b\x15\x40\xad\xa8\x4a\x77\x47\x3e\xdf\xf9\x3c\x42\xae\x43\x8e\x08\x05\x74\x86\x9c\xf7\x46\xd5\x98\x90\x3a\x28\xa0\x64\x41\x85\xef\xb8\x93\x64\xb6\x7e\x44\x2a\x21\x42\xaf\x0c\xd7\xd2\x22\xa5\x08\x05\x9c\x02\x37\xc8\xc0\x42\x90\x65\xc9\xc4\x66\x35\x87\xbe\xcf\xcb\x31\xd9\x61\x50\x3e\xd4\x50\x8c\x2f\x2f\x81\x9b\xb9\xe3\x61\xf8\xbf\x0b\x64\x03\x67\xd8\x21\xa5\xcc\x87\x5a\x21\x73\xe0\x9f\xd4\xe5\xaf\x2c\x26\x8b\xcc\x2a\x48\x3a\x48\xba\xcf\x04\x49\x2a\xee\x83\x78\xab\x13\x1b\x8a\x15\xb2\xae\x9c\xc7\xf1\xc4\xb7\xc5\x93\x3a\xed\x91\x74\x0a\xdf\xe5\x97\x70\xfd\xa8\x17\xaf\xab\x52\xaf\x37\x7a\xf1\xbc\x9a\x95\xaa\xef\x5d\x05\x84\x90\xcf\x0e\x12\x61\x0a\xd9\x30\xa8\xbe\x3f\xb0\xa3\x54\xc1\x84\xf1\x28\x18\x93\xde\x8d\x65\x01\xff\xec\xe4\x02\x9e\xa1\x0c\x90\xec\x39\x5d\x15\x1b\xd3\x2e\xb7\x30\xcd\xef\x59\x5a\x6c\x03\x7f\x8c\x9e\x7c\x5a\xc1\xf2\x61\x72\x9d\xfc\x6e\x9b\xbb\xd8\xfc\xa9\xb3\x2e\x36\x37\xb2\xcb\xe2\xc6\xa6\x8e\x82\x82\xea\x33\x00\x00\xff\xff\x61\xe0\x01\xde\xf9\x01\x00\x00") -func configPbsTemplateTxtBytes() ([]byte, error) { +func configHtcondorTemplateTxtBytes() ([]byte, error) { return bindataRead( - _configPbsTemplateTxt, - "config/pbs-template.txt", + _configHtcondorTemplateTxt, + "config/htcondor-template.txt", ) } -func configPbsTemplateTxt() (*asset, error) { - bytes, err := configPbsTemplateTxtBytes() +func configHtcondorTemplateTxt() (*asset, error) { + bytes, err := configHtcondorTemplateTxtBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "config/pbs-template.txt", size: 361, mode: os.FileMode(436), modTime: time.Unix(1701431150, 0)} + info := bindataFileInfo{name: "config/htcondor-template.txt", size: 505, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _configSlurmTemplateTxt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x90\xc1\x6a\xc3\x30\x0c\x86\xef\x79\x0a\x2d\xa5\x47\x27\xd9\x23\xac\x0d\x74\xbb\x6e\x85\x9d\x9d\x45\x61\x9e\x67\xd9\x48\x36\x3b\x18\xbf\xfb\x48\x53\x68\x0a\x0b\xbb\x19\xeb\xfb\x3f\xa4\x7f\xf7\xd0\x0e\x86\xda\x41\xcb\x67\xb5\x7b\x3b\x3c\x9d\x8f\xcf\xa0\xd4\x97\x1f\x14\x69\x87\x90\x73\x73\xd6\x62\x5f\xc6\x52\x56\x63\x8a\x5a\xac\xc0\xe3\xea\x0b\x99\x3d\xcf\xf8\xbb\x67\xdb\x1b\x2e\xa5\x9d\x12\x11\x7e\x2b\x89\x23\x32\xaf\x50\x9f\x62\x48\x71\x8b\xf5\x29\x56\x39\x9b\x09\x08\xa1\x39\x86\x24\xd0\x81\x2a\xa5\xca\x39\xb0\xa1\x38\x41\x7d\x33\x7d\x84\x24\x2a\x20\xab\x79\x1f\xd8\x8f\xf5\x92\xb8\xd0\x0a\x90\xc6\xcb\xeb\xea\x7a\xd5\xee\x34\x40\xd7\x6c\xeb\x1c\x3a\xd8\x37\xdd\x74\x3a\xd4\x57\xfc\x6f\x53\x6f\xc4\xfe\xa3\x8a\x2e\xdc\x54\x0b\x7f\xe7\xaa\x96\x83\xe1\xc7\xb3\x45\x06\x4e\x34\x87\xe6\xa6\xfb\xbb\xce\x7f\x03\x00\x00\xff\xff\x71\x9e\x5b\xbd\x9f\x01\x00\x00") +var _configKubernetesTemplateYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x54\xcb\x6e\xdb\x30\x10\xbc\xeb\x2b\x16\x0a\x7a\x94\xa5\x5c\x7a\xe0\xcd\x48\x82\xb4\x45\xad\x04\x45\x90\x3b\x45\xad\x62\xc2\x7c\x95\x4b\x39\x30\x0c\xfd\x7b\x41\x51\x6e\x2d\xbf\x0e\xe5\x89\xdc\x21\x67\x66\xd7\x63\x71\x27\xdf\xd1\x93\xb4\x86\x41\xc3\x83\x58\x97\xdb\xfb\x6c\x23\x4d\xcb\xe0\x87\x6d\x32\x8d\x81\xb7\x3c\x70\x96\x01\xdc\xdd\xc1\xe3\x0b\xd4\x2f\x6f\xf0\xf0\x6d\x59\x3f\x3f\x41\xbd\x5c\x3d\x65\x00\x86\x6b\x64\xb0\xdf\x2f\xde\x38\x6d\xbe\xb7\xc3\x30\xd5\xc8\x71\x91\x80\xfa\x70\x1a\x86\x8c\x1c\x0a\x06\x19\x40\xc3\xc5\xc6\x76\xdd\x4f\xa9\x65\x60\x50\x65\x00\xc2\x6a\xa7\x30\x48\x6b\x88\xc1\x7d\x06\x10\x50\x3b\xc5\x03\x46\x75\x80\xf1\xe5\xb8\x03\x20\xf4\x5b\x29\x70\x29\x84\xed\x4d\xa8\x47\x07\x5d\x6f\x0c\xaa\x82\xf8\x74\xc7\x23\x05\xee\xc3\xab\x55\x52\xec\x18\xd4\xb8\x45\x3f\x41\xc2\x9a\xc0\xa5\x41\x4f\xa3\x95\xb4\x8a\xa9\x93\x89\xe7\xd3\xfa\x0d\xfa\x62\xde\xd7\x61\x49\xcd\x3f\x90\x81\x5d\x53\x1f\x5d\x37\xd2\x96\xd3\xb3\x56\x9a\xb6\xf0\xd6\x06\x85\x44\x2c\xba\xa7\x70\xfa\xf0\xb5\x57\xea\x60\x6b\xa9\x3e\xf9\x8e\x8e\x6e\x70\xff\x41\xec\xe8\x1c\x8d\xe5\xc9\x4c\x7e\x5a\xf6\xbd\x39\xab\x15\x85\xb0\xa6\x93\x1f\x67\x40\x89\x41\x94\x09\x2b\xe7\x3d\xa6\xe2\x62\xa7\xd5\x05\xb6\x10\xbb\x7f\x3c\x05\x2e\x8f\xc5\x23\xd9\xde\x0b\x3c\x69\x20\x02\xbf\x7b\xa4\x70\x56\x07\x10\xae\x8f\x19\x91\x1d\x18\x84\xc5\x83\xeb\x09\x2a\x28\x86\x61\xbf\x1f\x0f\x71\x03\xa8\x08\x21\xee\xf2\xfb\xaa\xd2\x79\xdc\xa1\x99\x2b\xa7\xa5\x51\x5b\xbf\x3b\xe2\xfb\xc5\xf5\x73\x03\xd5\x62\xa2\x74\x5e\x9a\xd0\x41\xfe\x65\x51\x75\xcf\xf9\x04\x8f\x74\x8a\x30\x09\x7c\x5d\xdd\xe0\x47\xb7\x46\x8d\x9e\xab\x82\x82\xf5\x63\x04\xfe\x4a\x3d\x4a\xda\xdc\xd2\x4a\xf8\x5c\xac\xaa\x2e\xab\x6d\xad\xea\x35\xae\x62\xb6\xcf\xb2\x30\x0b\xe9\x64\xe3\x4a\x4a\xc7\x91\x44\x92\x57\x1e\xd6\x0c\x4a\xeb\xc2\xf4\xcb\x1f\x07\xa0\x68\xa5\x2f\xaf\x13\x50\xdf\xa4\xe7\xd7\xae\x1c\x2c\xa5\x14\x15\xc9\xfb\x0d\x17\xff\x62\x98\x65\xc7\xed\x5e\xfa\x2f\x5e\xe3\x4c\xf5\x15\x77\xf3\xe9\xcc\x66\x33\x69\xfc\xd7\xe4\x5c\xfc\x26\x52\x40\x13\xde\x47\xe9\x07\xc5\xa5\x9e\x6b\x89\x58\x4a\x5f\x9e\x03\x97\xdb\x0a\xf8\x13\x00\x00\xff\xff\x57\x40\xab\x27\x51\x05\x00\x00") -func configSlurmTemplateTxtBytes() ([]byte, error) { +func configKubernetesTemplateYamlBytes() ([]byte, error) { return bindataRead( - _configSlurmTemplateTxt, - "config/slurm-template.txt", + _configKubernetesTemplateYaml, + "config/kubernetes-template.yaml", ) } -func configSlurmTemplateTxt() (*asset, error) { - bytes, err := configSlurmTemplateTxtBytes() +func configKubernetesTemplateYaml() (*asset, error) { + bytes, err := configKubernetesTemplateYamlBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "config/slurm-template.txt", size: 415, mode: os.FileMode(436), modTime: time.Unix(1701431150, 0)} + info := bindataFileInfo{name: "config/kubernetes-template.yaml", size: 1361, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -275,24 +274,26 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "config/default-config.yaml": configDefaultConfigYaml, "config/gridengine-template.txt": configGridengineTemplateTxt, - "config/htcondor-template.txt": configHtcondorTemplateTxt, - "config/kubernetes-executor-template.yaml": configKubernetesExecutorTemplateYaml, - "config/kubernetes-template.yaml": configKubernetesTemplateYaml, "config/pbs-template.txt": configPbsTemplateTxt, "config/slurm-template.txt": configSlurmTemplateTxt, + "config/kubernetes-executor-template.yaml": configKubernetesExecutorTemplateYaml, + "config/default-config.yaml": configDefaultConfigYaml, + "config/htcondor-template.txt": configHtcondorTemplateTxt, + "config/kubernetes-template.yaml": configKubernetesTemplateYaml, } // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png +// +// data/ +// foo.txt +// img/ +// a.png +// b.png +// // then AssetDir("data") would return []string{"foo.txt", "img"} // AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("foo.txt") and AssetDir("notexist") would return an error @@ -325,14 +326,14 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "config": &bintree{nil, map[string]*bintree{ - "default-config.yaml": &bintree{configDefaultConfigYaml, map[string]*bintree{}}, - "gridengine-template.txt": &bintree{configGridengineTemplateTxt, map[string]*bintree{}}, - "htcondor-template.txt": &bintree{configHtcondorTemplateTxt, map[string]*bintree{}}, - "kubernetes-executor-template.yaml": &bintree{configKubernetesExecutorTemplateYaml, map[string]*bintree{}}, - "kubernetes-template.yaml": &bintree{configKubernetesTemplateYaml, map[string]*bintree{}}, - "pbs-template.txt": &bintree{configPbsTemplateTxt, map[string]*bintree{}}, - "slurm-template.txt": &bintree{configSlurmTemplateTxt, map[string]*bintree{}}, + "config": {nil, map[string]*bintree{ + "default-config.yaml": {configDefaultConfigYaml, map[string]*bintree{}}, + "gridengine-template.txt": {configGridengineTemplateTxt, map[string]*bintree{}}, + "htcondor-template.txt": {configHtcondorTemplateTxt, map[string]*bintree{}}, + "kubernetes-executor-template.yaml": {configKubernetesExecutorTemplateYaml, map[string]*bintree{}}, + "kubernetes-template.yaml": {configKubernetesTemplateYaml, map[string]*bintree{}}, + "pbs-template.txt": {configPbsTemplateTxt, map[string]*bintree{}}, + "slurm-template.txt": {configSlurmTemplateTxt, map[string]*bintree{}}, }}, }} @@ -350,7 +351,7 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) + err = os.WriteFile(_filePath(dir, name), data, info.Mode()) if err != nil { return err } diff --git a/config/utils.go b/config/utils.go index c1619aa5..8a63463f 100644 --- a/config/utils.go +++ b/config/utils.go @@ -3,7 +3,7 @@ package config import ( "encoding/json" "fmt" - "io/ioutil" + "os" "path/filepath" "reflect" "strings" @@ -22,7 +22,7 @@ func ToYamlFile(c Config, path string) error { if err != nil { return err } - return ioutil.WriteFile(path, b, 0600) + return os.WriteFile(path, b, 0600) } // Parse parses a YAML doc into the given Config instance. @@ -56,7 +56,7 @@ func ParseFile(relpath string, conf *Config) error { } // Read file - source, err := ioutil.ReadFile(path) + source, err := os.ReadFile(path) if err != nil { return fmt.Errorf("failed to read config at path %s: \n%v", path, err) } diff --git a/database/badger/events.go b/database/badger/events.go index 05a98870..6b420b23 100644 --- a/database/badger/events.go +++ b/database/badger/events.go @@ -6,10 +6,10 @@ import ( "time" badger "github.com/dgraph-io/badger/v2" - proto "github.com/golang/protobuf/proto" "github.com/ohsu-comp-bio/funnel/events" "github.com/ohsu-comp-bio/funnel/tes" "github.com/ohsu-comp-bio/funnel/util" + "google.golang.org/protobuf/proto" ) // WriteEvent creates an event for the server to handle. diff --git a/database/badger/tes.go b/database/badger/tes.go index aea2d3b7..0ef5983f 100644 --- a/database/badger/tes.go +++ b/database/badger/tes.go @@ -5,8 +5,8 @@ import ( "fmt" badger "github.com/dgraph-io/badger/v2" - proto "github.com/golang/protobuf/proto" "github.com/ohsu-comp-bio/funnel/tes" + "google.golang.org/protobuf/proto" ) // GetTask gets a task, which describes a running task diff --git a/database/boltdb/events.go b/database/boltdb/events.go index f48508ef..ec98319f 100644 --- a/database/boltdb/events.go +++ b/database/boltdb/events.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/boltdb/bolt" - proto "github.com/golang/protobuf/proto" "github.com/ohsu-comp-bio/funnel/events" "github.com/ohsu-comp-bio/funnel/tes" + "google.golang.org/protobuf/proto" ) // State variables for convenience @@ -31,14 +31,15 @@ func (taskBolt *BoltDB) WriteEvent(ctx context.Context, req *events.Event) error if req.Type == events.Type_TASK_CREATED { task := req.GetTask() idBytes := []byte(task.Id) - taskString, err := proto.Marshal(task) + taskBytes, err := proto.Marshal(task) if err != nil { return err } err = taskBolt.db.Update(func(tx *bolt.Tx) error { - tx.Bucket(TaskBucket).Put(idBytes, taskString) - tx.Bucket(TaskState).Put(idBytes, []byte(tes.State_QUEUED.String())) - return nil + if err := tx.Bucket(TaskBucket).Put(idBytes, taskBytes); err != nil { + return err + } + return tx.Bucket(TaskState).Put(idBytes, []byte(tes.State_QUEUED.String())) }) if err != nil { return fmt.Errorf("error storing task in database: %s", err) @@ -143,9 +144,12 @@ func (taskBolt *BoltDB) WriteEvent(ctx context.Context, req *events.Event) error } err = taskBolt.db.Update(func(tx *bolt.Tx) error { - tx.Bucket(SysLogs).Put(idBytes, logbytes) - return nil + return tx.Bucket(SysLogs).Put(idBytes, logbytes) }) + + if err != nil { + fmt.Printf("Detected error while updating SysLogs in Bolt [%s]: %s\n", req.Id, err) + } } return err @@ -179,20 +183,23 @@ func transitionTaskState(tx *bolt.Tx, id string, target tes.State) error { case Canceled, Complete, ExecutorError, SystemError: // Remove from queue - tx.Bucket(TasksQueued).Delete(idBytes) + if err := tx.Bucket(TasksQueued).Delete(idBytes); err != nil { + return err + } case Running, Initializing: if current != Unknown && current != Queued && current != Initializing { return fmt.Errorf("Unexpected transition from %s to %s", current.String(), target.String()) } - tx.Bucket(TasksQueued).Delete(idBytes) + if err := tx.Bucket(TasksQueued).Delete(idBytes); err != nil { + return err + } default: return fmt.Errorf("Unknown target state: %s", target.String()) } - tx.Bucket(TaskState).Put(idBytes, []byte(target.String())) - return nil + return tx.Bucket(TaskState).Put(idBytes, []byte(target.String())) } func updateTaskLogs(tx *bolt.Tx, id string, tl *tes.TaskLog) error { diff --git a/database/boltdb/new.go b/database/boltdb/new.go index 7533ef14..67099e1b 100644 --- a/database/boltdb/new.go +++ b/database/boltdb/new.go @@ -1,6 +1,7 @@ package boltdb import ( + "fmt" "time" "github.com/boltdb/bolt" @@ -39,7 +40,8 @@ var ExecutorStderr = []byte("executor-stderr") var Nodes = []byte("nodes") // SysLogs defeines the name of a bucket with maps -// task ID -> tes.TaskLog.SystemLogs +// +// task ID -> tes.TaskLog.SystemLogs var SysLogs = []byte("system-logs") // BoltDB provides handlers for gRPC endpoints. @@ -51,7 +53,9 @@ type BoltDB struct { // NewBoltDB returns a new instance of BoltDB, accessing the database at // the given path, and including the given ServerConfig. func NewBoltDB(conf config.BoltDB) (*BoltDB, error) { - fsutil.EnsurePath(conf.Path) + if err := fsutil.EnsurePath(conf.Path); err != nil { + return nil, err + } db, err := bolt.Open(conf.Path, 0600, &bolt.Options{ Timeout: time.Second * 5, }) @@ -65,37 +69,28 @@ func NewBoltDB(conf config.BoltDB) (*BoltDB, error) { func (taskBolt *BoltDB) Init() error { // Check to make sure all the required buckets have been created return taskBolt.db.Update(func(tx *bolt.Tx) error { - if tx.Bucket(TaskBucket) == nil { - tx.CreateBucket(TaskBucket) - } - if tx.Bucket(TasksQueued) == nil { - tx.CreateBucket(TasksQueued) - } - if tx.Bucket(TaskState) == nil { - tx.CreateBucket(TaskState) - } - if tx.Bucket(TasksLog) == nil { - tx.CreateBucket(TasksLog) - } - if tx.Bucket(ExecutorLogs) == nil { - tx.CreateBucket(ExecutorLogs) - } - if tx.Bucket(ExecutorStdout) == nil { - tx.CreateBucket(ExecutorStdout) - } - if tx.Bucket(ExecutorStderr) == nil { - tx.CreateBucket(ExecutorStderr) - } - if tx.Bucket(Nodes) == nil { - tx.CreateBucket(Nodes) - } - if tx.Bucket(SysLogs) == nil { - tx.CreateBucket(SysLogs) - } + ensureBucket(tx, TaskBucket) + ensureBucket(tx, TasksQueued) + ensureBucket(tx, TaskState) + ensureBucket(tx, TasksLog) + ensureBucket(tx, ExecutorLogs) + ensureBucket(tx, ExecutorStdout) + ensureBucket(tx, ExecutorStderr) + ensureBucket(tx, Nodes) + ensureBucket(tx, SysLogs) return nil }) } +func ensureBucket(tx *bolt.Tx, id []byte) { + if tx.Bucket(id) == nil { + if _, err := tx.CreateBucket(id); err != nil { + fmt.Printf("Detected error while creating non-existing "+ + "Bolt bucket [%s]: %s\n", string(id), err) + } + } +} + func (taskBolt *BoltDB) Close() { taskBolt.db.Close() } diff --git a/database/boltdb/scheduler.go b/database/boltdb/scheduler.go index 2bdf2705..bc717101 100644 --- a/database/boltdb/scheduler.go +++ b/database/boltdb/scheduler.go @@ -4,12 +4,12 @@ import ( "fmt" "github.com/boltdb/bolt" - proto "github.com/golang/protobuf/proto" "github.com/ohsu-comp-bio/funnel/compute/scheduler" "github.com/ohsu-comp-bio/funnel/tes" "golang.org/x/net/context" - "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // queueTask adds a task to the scheduler queue. @@ -18,8 +18,7 @@ func (taskBolt *BoltDB) queueTask(task *tes.Task) error { idBytes := []byte(taskID) err := taskBolt.db.Update(func(tx *bolt.Tx) error { - tx.Bucket(TasksQueued).Put(idBytes, []byte{}) - return nil + return tx.Bucket(TasksQueued).Put(idBytes, []byte{}) }) if err != nil { return fmt.Errorf("can't queue task: %s", err) @@ -30,7 +29,7 @@ func (taskBolt *BoltDB) queueTask(task *tes.Task) error { // ReadQueue returns a slice of queued Tasks. Up to "n" tasks are returned. func (taskBolt *BoltDB) ReadQueue(n int) []*tes.Task { tasks := make([]*tes.Task, 0) - taskBolt.db.View(func(tx *bolt.Tx) error { + err := taskBolt.db.View(func(tx *bolt.Tx) error { // Iterate over the TasksQueued bucket, reading the first `n` tasks c := tx.Bucket(TasksQueued).Cursor() @@ -41,6 +40,9 @@ func (taskBolt *BoltDB) ReadQueue(n int) []*tes.Task { } return nil }) + if err != nil { + fmt.Printf("Detected error while reading task queue from Bolt: %s\n", err) + } return tasks } @@ -54,7 +56,9 @@ func (taskBolt *BoltDB) PutNode(ctx context.Context, node *scheduler.Node) (*sch existing := &scheduler.Node{} data := tx.Bucket(Nodes).Get([]byte(node.Id)) if data != nil { - proto.Unmarshal(data, existing) + if err2 := proto.Unmarshal(data, existing); err2 != nil { + fmt.Printf("Detected error while unmarshaling node info from bucket [%s]: %s\n", node.Id, err2) + } } if existing.GetVersion() != 0 && node.Version != existing.GetVersion() { @@ -90,7 +94,7 @@ func (taskBolt *BoltDB) GetNode(ctx context.Context, req *scheduler.GetNodeReque }) if err == errNotFound { - return nil, grpc.Errorf(codes.NotFound, fmt.Sprintf("%v: nodeID: %s", err.Error(), req.Id)) + return nil, status.Errorf(codes.NotFound, fmt.Sprintf("%v: nodeID: %s", err.Error(), req.Id)) } if err != nil { diff --git a/database/boltdb/tes.go b/database/boltdb/tes.go index e7c9004d..0f8506be 100644 --- a/database/boltdb/tes.go +++ b/database/boltdb/tes.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/boltdb/bolt" - proto "github.com/golang/protobuf/proto" "github.com/ohsu-comp-bio/funnel/tes" "golang.org/x/net/context" + "google.golang.org/protobuf/proto" ) func getTaskState(tx *bolt.Tx, id string) tes.State { @@ -36,7 +36,10 @@ func loadBasicTaskView(tx *bolt.Tx, id string, task *tes.Task) error { if b == nil { return tes.ErrNotFound } - proto.Unmarshal(b, task) + if err := proto.Unmarshal(b, task); err != nil { + fmt.Printf("Detected error while unmarshalling task "+ + "from task-bucket by ID=%s: %s\n", id, err) + } loadTaskLogs(tx, task) // remove content from inputs @@ -55,7 +58,10 @@ func loadFullTaskView(tx *bolt.Tx, id string, task *tes.Task) error { if b == nil { return tes.ErrNotFound } - proto.Unmarshal(b, task) + if err := proto.Unmarshal(b, task); err != nil { + fmt.Printf("Detected error while unmarshalling task "+ + "from task-bucket by ID=%s: %s\n", id, err) + } loadTaskLogs(tx, task) // Load executor stdout/err @@ -95,14 +101,21 @@ func loadTaskLogs(tx *bolt.Tx, task *tes.Task) { b := tx.Bucket(TasksLog).Get([]byte(task.Id)) if b != nil { - proto.Unmarshal(b, tasklog) + if err := proto.Unmarshal(b, tasklog); err != nil { + fmt.Printf("Detected error while unmarshalling task-log "+ + "from task-logs-bucket by ID=%s: %s\n", task.Id, err) + } } for i := range task.Executors { o := tx.Bucket(ExecutorLogs).Get([]byte(fmt.Sprint(task.Id, i))) if o != nil { var execlog tes.ExecutorLog - proto.Unmarshal(o, &execlog) + if err := proto.Unmarshal(o, &execlog); err != nil { + fmt.Printf("Detected error while unmarshalling executor log "+ + "from executor-logs-bucket by ID=%s: %s\n", + fmt.Sprint(task.Id, i), err) + } tasklog.Logs = append(tasklog.Logs, &execlog) } } @@ -147,7 +160,7 @@ func (taskBolt *BoltDB) ListTasks(ctx context.Context, req *tes.ListTasksRequest } pageSize := tes.GetPageSize(req.GetPageSize()) - taskBolt.db.View(func(tx *bolt.Tx) error { + err := taskBolt.db.View(func(tx *bolt.Tx) error { c := tx.Bucket(TaskBucket).Cursor() i := 0 @@ -190,6 +203,10 @@ func (taskBolt *BoltDB) ListTasks(ctx context.Context, req *tes.ListTasksRequest return nil }) + if err != nil { + return nil, err + } + out := tes.ListTasksResponse{ Tasks: tasks, } diff --git a/database/datastore/tes.go b/database/datastore/tes.go index a6ad8db3..1e658607 100644 --- a/database/datastore/tes.go +++ b/database/datastore/tes.go @@ -47,7 +47,7 @@ func (d *Datastore) GetTask(ctx context.Context, req *tes.GetTaskRequest) (*tes. // multiple tasks in one call, in order to support ListTasks. The "tasks" arg // is a map of task ID -> task. func (d *Datastore) getFullView(ctx context.Context, keys []*datastore.Key, tasks map[string]*tes.Task) error { - proplists := make([]datastore.PropertyList, len(keys), len(keys)) + proplists := make([]datastore.PropertyList, len(keys)) err := d.client.GetMulti(ctx, keys, proplists) merr, isMerr := err.(datastore.MultiError) if err != nil && !isMerr { @@ -85,11 +85,11 @@ func (d *Datastore) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (* } if req.State != tes.Unknown { - q = q.Filter("State =", int32(req.State)) + q = q.FilterField("State", "=", int32(req.State)) } for k, v := range req.Tags { - q = q.Filter("TagStrings =", encodeKV(k, v)) + q = q.FilterField("TagStrings", "=", encodeKV(k, v)) } var tasks []*tes.Task @@ -109,7 +109,7 @@ func (d *Datastore) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (* keys = append(keys, key) } - proplists := make([]datastore.PropertyList, len(keys), len(keys)) + proplists := make([]datastore.PropertyList, len(keys)) err := d.client.GetMulti(ctx, keys, proplists) if err != nil { return nil, err diff --git a/database/dynamodb/errors.go b/database/dynamodb/errors.go deleted file mode 100644 index 1bd35a6a..00000000 --- a/database/dynamodb/errors.go +++ /dev/null @@ -1,8 +0,0 @@ -package dynamodb - -import ( - "errors" -) - -// errNotFound ... -var errNotFound = errors.New("not found") diff --git a/database/dynamodb/util.go b/database/dynamodb/util.go index 51cfef34..78fdefd6 100644 --- a/database/dynamodb/util.go +++ b/database/dynamodb/util.go @@ -314,71 +314,6 @@ func (db *DynamoDB) createTaskInputContent(ctx context.Context, task *tes.Task) return nil } -func (db *DynamoDB) deleteTask(ctx context.Context, id string) error { - var item *dynamodb.DeleteItemInput - var err error - - item = &dynamodb.DeleteItemInput{ - TableName: aws.String(db.taskTable), - Key: map[string]*dynamodb.AttributeValue{ - db.partitionKey: { - S: aws.String(db.partitionValue), - }, - "id": { - S: aws.String(id), - }, - }, - } - _, err = db.client.DeleteItemWithContext(ctx, item) - if err != nil { - return err - } - - query := &dynamodb.QueryInput{ - TableName: aws.String(db.contentTable), - Limit: aws.Int64(10), - ScanIndexForward: aws.Bool(false), - ConsistentRead: aws.Bool(true), - KeyConditionExpression: aws.String("id = :v1"), - ExpressionAttributeValues: map[string]*dynamodb.AttributeValue{ - ":v1": { - S: aws.String(id), - }, - }, - ExpressionAttributeNames: map[string]*string{ - "#index": aws.String("index"), - }, - ProjectionExpression: aws.String("id, #index"), - } - - err = db.client.QueryPagesWithContext( - ctx, - query, - func(page *dynamodb.QueryOutput, lastPage bool) bool { - for _, res := range page.Items { - item = &dynamodb.DeleteItemInput{ - TableName: aws.String(db.contentTable), - Key: map[string]*dynamodb.AttributeValue{ - "id": res["id"], - "index": res["index"], - }, - } - // TODO handle error - db.client.DeleteItem(item) - } - if page.LastEvaluatedKey == nil { - return false - } - return true - }) - - if err != nil { - return err - } - - return nil -} - func (db *DynamoDB) getMinimalView(ctx context.Context, id string) (*dynamodb.GetItemOutput, error) { item := &dynamodb.GetItemInput{ TableName: aws.String(db.taskTable), @@ -474,10 +409,7 @@ func (db *DynamoDB) getContent(ctx context.Context, in map[string]*dynamodb.Attr i, _ := strconv.ParseInt(*item["index"].N, 10, 64) in["inputs"].L[i].M["content"] = item["content"] } - if page.LastEvaluatedKey == nil { - return false - } - return true + return page.LastEvaluatedKey != nil }, ) if err != nil { @@ -511,10 +443,7 @@ func (db *DynamoDB) getExecutorOutput(ctx context.Context, in map[string]*dynamo } } } - if page.LastEvaluatedKey == nil { - return false - } - return true + return page.LastEvaluatedKey != nil }, ) if err != nil { @@ -543,10 +472,7 @@ func (db *DynamoDB) getSystemLogs(ctx context.Context, in map[string]*dynamodb.A i, _ := strconv.ParseInt(*item["attempt"].N, 10, 64) in["logs"].L[i].M["system_logs"] = item["system_logs"] } - if page.LastEvaluatedKey == nil { - return false - } - return true + return page.LastEvaluatedKey != nil }, ) if err != nil { diff --git a/database/elastic/events.go b/database/elastic/events.go index 92f890d3..2e0793b6 100644 --- a/database/elastic/events.go +++ b/database/elastic/events.go @@ -1,13 +1,12 @@ package elastic import ( - "bytes" "context" - "github.com/golang/protobuf/jsonpb" "github.com/ohsu-comp-bio/funnel/events" "github.com/ohsu-comp-bio/funnel/tes" "github.com/ohsu-comp-bio/funnel/util" + "google.golang.org/protobuf/encoding/protojson" elastic "gopkg.in/olivere/elastic.v5" ) @@ -91,8 +90,8 @@ func (es *Elastic) WriteEvent(ctx context.Context, ev *events.Event) error { switch ev.Type { case events.Type_TASK_CREATED: task := ev.GetTask() - mar := jsonpb.Marshaler{} - s, err := mar.MarshalToString(task) + mar := protojson.MarshalOptions{} + b, err := mar.Marshal(task) if err != nil { return err } @@ -101,7 +100,7 @@ func (es *Elastic) WriteEvent(ctx context.Context, ev *events.Event) error { Index(es.taskIndex). Type("task"). Id(task.Id). - BodyString(s). + BodyString(string(b)). Do(ctx) return err @@ -122,7 +121,7 @@ func (es *Elastic) WriteEvent(ctx context.Context, ev *events.Event) error { } task := &tes.Task{} - err = jsonpb.Unmarshal(bytes.NewReader(*res.Source), task) + err = protojson.Unmarshal(*res.Source, task) if err != nil { return err } diff --git a/database/elastic/scheduler.go b/database/elastic/scheduler.go index 4020a477..c765d79f 100644 --- a/database/elastic/scheduler.go +++ b/database/elastic/scheduler.go @@ -1,15 +1,14 @@ package elastic import ( - "bytes" "fmt" - "github.com/golang/protobuf/jsonpb" "github.com/ohsu-comp-bio/funnel/compute/scheduler" "github.com/ohsu-comp-bio/funnel/tes" "golang.org/x/net/context" - "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/protojson" elastic "gopkg.in/olivere/elastic.v5" ) @@ -33,7 +32,7 @@ func (es *Elastic) ReadQueue(n int) []*tes.Task { var tasks []*tes.Task for _, hit := range res.Hits.Hits { t := &tes.Task{} - err := jsonpb.Unmarshal(bytes.NewReader(*hit.Source), t) + err := protojson.Unmarshal(*hit.Source, t) if err != nil { continue } @@ -54,14 +53,14 @@ func (es *Elastic) GetNode(ctx context.Context, req *scheduler.GetNodeRequest) ( Do(ctx) if elastic.IsNotFound(err) { - return nil, grpc.Errorf(codes.NotFound, fmt.Sprintf("%v: nodeID: %s", err.Error(), req.Id)) + return nil, status.Errorf(codes.NotFound, fmt.Sprintf("%v: nodeID: %s", err.Error(), req.Id)) } if err != nil { return nil, err } node := &scheduler.Node{} - err = jsonpb.Unmarshal(bytes.NewReader(*res.Source), node) + err = protojson.Unmarshal(*res.Source, node) if err != nil { return nil, err } @@ -94,7 +93,9 @@ func (es *Elastic) PutNode(ctx context.Context, node *scheduler.Node) (*schedule existing := &scheduler.Node{} if err == nil { - jsonpb.Unmarshal(bytes.NewReader(*res.Source), existing) + if err2 := protojson.Unmarshal(*res.Source, existing); err2 != nil { + fmt.Printf("Detected error while unmarshaling node info from HTTP response: %s\n", err2) + } } err = scheduler.UpdateNode(ctx, es, node, existing) @@ -102,8 +103,8 @@ func (es *Elastic) PutNode(ctx context.Context, node *scheduler.Node) (*schedule return nil, err } - mar := jsonpb.Marshaler{} - s, err := mar.MarshalToString(node) + mar := protojson.MarshalOptions{} + b, err := mar.Marshal(node) if err != nil { return nil, err } @@ -113,7 +114,7 @@ func (es *Elastic) PutNode(ctx context.Context, node *scheduler.Node) (*schedule Type("node"). Id(node.Id). Refresh("true"). - BodyString(s) + BodyString(string(b)) if node.GetVersion() != 0 { i = i.Version(node.GetVersion()) @@ -151,7 +152,7 @@ func (es *Elastic) ListNodes(ctx context.Context, req *scheduler.ListNodesReques resp := &scheduler.ListNodesResponse{} for _, hit := range res.Hits.Hits { node := &scheduler.Node{} - err = jsonpb.Unmarshal(bytes.NewReader(*hit.Source), node) + err = protojson.Unmarshal(*hit.Source, node) if err != nil { return nil, err } diff --git a/database/elastic/tes.go b/database/elastic/tes.go index da82dc39..78c38711 100644 --- a/database/elastic/tes.go +++ b/database/elastic/tes.go @@ -1,12 +1,11 @@ package elastic import ( - "bytes" "fmt" - "github.com/golang/protobuf/jsonpb" "github.com/ohsu-comp-bio/funnel/tes" "golang.org/x/net/context" + "google.golang.org/protobuf/encoding/protojson" elastic "gopkg.in/olivere/elastic.v5" ) @@ -37,7 +36,7 @@ func (es *Elastic) GetTask(ctx context.Context, req *tes.GetTaskRequest) (*tes.T return nil, err } task := &tes.Task{} - err = jsonpb.Unmarshal(bytes.NewReader(*res.Source), task) + err = protojson.Unmarshal(*res.Source, task) return task, err } @@ -83,7 +82,7 @@ func (es *Elastic) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*t resp := &tes.ListTasksResponse{} for i, hit := range res.Hits.Hits { t := &tes.Task{} - err := jsonpb.Unmarshal(bytes.NewReader(*hit.Source), t) + err := protojson.Unmarshal(*hit.Source, t) if err != nil { return nil, err } diff --git a/database/mongodb/events.go b/database/mongodb/events.go index 0ddd1f04..f0b91b61 100644 --- a/database/mongodb/events.go +++ b/database/mongodb/events.go @@ -34,10 +34,7 @@ func (db *MongoDB) WriteEvent(ctx context.Context, req *events.Event) error { case events.Type_TASK_STATE: retrier := util.NewRetrier() retrier.ShouldRetry = func(err error) bool { - if err == mgo.ErrNotFound { - return true - } - return false + return err == mgo.ErrNotFound } return retrier.Retry(ctx, func() error { diff --git a/database/mongodb/scheduler.go b/database/mongodb/scheduler.go index d0fcc5be..dd8c5d30 100644 --- a/database/mongodb/scheduler.go +++ b/database/mongodb/scheduler.go @@ -8,8 +8,8 @@ import ( "github.com/ohsu-comp-bio/funnel/compute/scheduler" "github.com/ohsu-comp-bio/funnel/tes" "golang.org/x/net/context" - "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // ReadQueue returns a slice of queued Tasks. Up to "n" tasks are returned. @@ -66,7 +66,7 @@ func (db *MongoDB) GetNode(ctx context.Context, req *scheduler.GetNodeRequest) ( var node scheduler.Node err := db.nodes(sess).Find(bson.M{"id": req.Id}).One(&node) if err == mgo.ErrNotFound { - return nil, grpc.Errorf(codes.NotFound, fmt.Sprintf("%v: nodeID: %s", mgo.ErrNotFound.Error(), req.Id)) + return nil, status.Errorf(codes.NotFound, fmt.Sprintf("%v: nodeID: %s", mgo.ErrNotFound.Error(), req.Id)) } return &node, err } @@ -78,7 +78,7 @@ func (db *MongoDB) DeleteNode(ctx context.Context, req *scheduler.Node) (*schedu err := db.nodes(sess).Remove(bson.M{"id": req.Id}) if err == mgo.ErrNotFound { - return nil, grpc.Errorf(codes.NotFound, fmt.Sprintf("%v: nodeID: %s", mgo.ErrNotFound.Error(), req.Id)) + return nil, status.Errorf(codes.NotFound, fmt.Sprintf("%v: nodeID: %s", mgo.ErrNotFound.Error(), req.Id)) } return nil, err } diff --git a/events/events.pb.go b/events/events.pb.go index b6381e07..4d0dfbd5 100644 --- a/events/events.pb.go +++ b/events/events.pb.go @@ -1,42 +1,25 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: events.proto +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.3 +// source: events/events.proto -/* -Package events is a generated protocol buffer package. - -It is generated from these files: - events.proto - -It has these top-level messages: - Metadata - Outputs - SystemLog - Event - WriteEventResponse -*/ package events -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import tes "github.com/ohsu-comp-bio/funnel/tes" -import _ "google.golang.org/genproto/googleapis/api/annotations" - import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" + tes "github.com/ohsu-comp-bio/funnel/tes" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type Type int32 @@ -56,110 +39,233 @@ const ( Type_TASK_CREATED Type = 14 ) -var Type_name = map[int32]string{ - 0: "UNKNOWN", - 1: "TASK_STATE", - 2: "TASK_START_TIME", - 3: "TASK_END_TIME", - 4: "TASK_OUTPUTS", - 5: "TASK_METADATA", - 6: "EXECUTOR_START_TIME", - 7: "EXECUTOR_END_TIME", - 8: "EXECUTOR_EXIT_CODE", - 11: "EXECUTOR_STDOUT", - 12: "EXECUTOR_STDERR", - 13: "SYSTEM_LOG", - 14: "TASK_CREATED", -} -var Type_value = map[string]int32{ - "UNKNOWN": 0, - "TASK_STATE": 1, - "TASK_START_TIME": 2, - "TASK_END_TIME": 3, - "TASK_OUTPUTS": 4, - "TASK_METADATA": 5, - "EXECUTOR_START_TIME": 6, - "EXECUTOR_END_TIME": 7, - "EXECUTOR_EXIT_CODE": 8, - "EXECUTOR_STDOUT": 11, - "EXECUTOR_STDERR": 12, - "SYSTEM_LOG": 13, - "TASK_CREATED": 14, +// Enum value maps for Type. +var ( + Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "TASK_STATE", + 2: "TASK_START_TIME", + 3: "TASK_END_TIME", + 4: "TASK_OUTPUTS", + 5: "TASK_METADATA", + 6: "EXECUTOR_START_TIME", + 7: "EXECUTOR_END_TIME", + 8: "EXECUTOR_EXIT_CODE", + 11: "EXECUTOR_STDOUT", + 12: "EXECUTOR_STDERR", + 13: "SYSTEM_LOG", + 14: "TASK_CREATED", + } + Type_value = map[string]int32{ + "UNKNOWN": 0, + "TASK_STATE": 1, + "TASK_START_TIME": 2, + "TASK_END_TIME": 3, + "TASK_OUTPUTS": 4, + "TASK_METADATA": 5, + "EXECUTOR_START_TIME": 6, + "EXECUTOR_END_TIME": 7, + "EXECUTOR_EXIT_CODE": 8, + "EXECUTOR_STDOUT": 11, + "EXECUTOR_STDERR": 12, + "SYSTEM_LOG": 13, + "TASK_CREATED": 14, + } +) + +func (x Type) Enum() *Type { + p := new(Type) + *p = x + return p } func (x Type) String() string { - return proto.EnumName(Type_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Type) Descriptor() protoreflect.EnumDescriptor { + return file_events_events_proto_enumTypes[0].Descriptor() +} + +func (Type) Type() protoreflect.EnumType { + return &file_events_events_proto_enumTypes[0] +} + +func (x Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Type.Descriptor instead. +func (Type) EnumDescriptor() ([]byte, []int) { + return file_events_events_proto_rawDescGZIP(), []int{0} } -func (Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } type Metadata struct { - Value map[string]string `protobuf:"bytes,1,rep,name=value" json:"value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value map[string]string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (x *Metadata) Reset() { + *x = Metadata{} + if protoimpl.UnsafeEnabled { + mi := &file_events_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *Metadata) GetValue() map[string]string { - if m != nil { - return m.Value +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_events_events_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { + return file_events_events_proto_rawDescGZIP(), []int{0} +} + +func (x *Metadata) GetValue() map[string]string { + if x != nil { + return x.Value } return nil } type Outputs struct { - Value []*tes.OutputFileLog `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value []*tes.OutputFileLog `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` +} + +func (x *Outputs) Reset() { + *x = Outputs{} + if protoimpl.UnsafeEnabled { + mi := &file_events_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Outputs) Reset() { *m = Outputs{} } -func (m *Outputs) String() string { return proto.CompactTextString(m) } -func (*Outputs) ProtoMessage() {} -func (*Outputs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (x *Outputs) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *Outputs) GetValue() []*tes.OutputFileLog { - if m != nil { - return m.Value +func (*Outputs) ProtoMessage() {} + +func (x *Outputs) ProtoReflect() protoreflect.Message { + mi := &file_events_events_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Outputs.ProtoReflect.Descriptor instead. +func (*Outputs) Descriptor() ([]byte, []int) { + return file_events_events_proto_rawDescGZIP(), []int{1} +} + +func (x *Outputs) GetValue() []*tes.OutputFileLog { + if x != nil { + return x.Value } return nil } type SystemLog struct { - Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"` - Level string `protobuf:"bytes,2,opt,name=level" json:"level,omitempty"` - Fields map[string]string `protobuf:"bytes,3,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` + Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"` + Fields map[string]string `protobuf:"bytes,3,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *SystemLog) Reset() { *m = SystemLog{} } -func (m *SystemLog) String() string { return proto.CompactTextString(m) } -func (*SystemLog) ProtoMessage() {} -func (*SystemLog) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (x *SystemLog) Reset() { + *x = SystemLog{} + if protoimpl.UnsafeEnabled { + mi := &file_events_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *SystemLog) GetMsg() string { - if m != nil { - return m.Msg +func (x *SystemLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SystemLog) ProtoMessage() {} + +func (x *SystemLog) ProtoReflect() protoreflect.Message { + mi := &file_events_events_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SystemLog.ProtoReflect.Descriptor instead. +func (*SystemLog) Descriptor() ([]byte, []int) { + return file_events_events_proto_rawDescGZIP(), []int{2} +} + +func (x *SystemLog) GetMsg() string { + if x != nil { + return x.Msg } return "" } -func (m *SystemLog) GetLevel() string { - if m != nil { - return m.Level +func (x *SystemLog) GetLevel() string { + if x != nil { + return x.Level } return "" } -func (m *SystemLog) GetFields() map[string]string { - if m != nil { - return m.Fields +func (x *SystemLog) GetFields() map[string]string { + if x != nil { + return x.Fields } return nil } type Event struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Timestamp string `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` - // Types that are valid to be assigned to Data: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Types that are assignable to Data: + // // *Event_State // *Event_StartTime // *Event_EndTime @@ -171,509 +277,486 @@ type Event struct { // *Event_SystemLog // *Event_Task Data isEvent_Data `protobuf_oneof:"data"` - Attempt uint32 `protobuf:"varint,16,opt,name=attempt" json:"attempt,omitempty"` - Index uint32 `protobuf:"varint,17,opt,name=index" json:"index,omitempty"` - Type Type `protobuf:"varint,18,opt,name=type,enum=events.Type" json:"type,omitempty"` + Attempt uint32 `protobuf:"varint,16,opt,name=attempt,proto3" json:"attempt,omitempty"` + Index uint32 `protobuf:"varint,17,opt,name=index,proto3" json:"index,omitempty"` + Type Type `protobuf:"varint,18,opt,name=type,proto3,enum=events.Type" json:"type,omitempty"` } -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -type isEvent_Data interface { - isEvent_Data() +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_events_events_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -type Event_State struct { - State tes.State `protobuf:"varint,3,opt,name=state,enum=tes.State,oneof"` -} -type Event_StartTime struct { - StartTime string `protobuf:"bytes,4,opt,name=start_time,json=startTime,oneof"` -} -type Event_EndTime struct { - EndTime string `protobuf:"bytes,5,opt,name=end_time,json=endTime,oneof"` +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) } -type Event_Outputs struct { - Outputs *Outputs `protobuf:"bytes,6,opt,name=outputs,oneof"` -} -type Event_Metadata struct { - Metadata *Metadata `protobuf:"bytes,7,opt,name=metadata,oneof"` -} -type Event_ExitCode struct { - ExitCode int32 `protobuf:"varint,10,opt,name=exit_code,json=exitCode,oneof"` -} -type Event_Stdout struct { - Stdout string `protobuf:"bytes,13,opt,name=stdout,oneof"` -} -type Event_Stderr struct { - Stderr string `protobuf:"bytes,14,opt,name=stderr,oneof"` -} -type Event_SystemLog struct { - SystemLog *SystemLog `protobuf:"bytes,15,opt,name=system_log,json=systemLog,oneof"` -} -type Event_Task struct { - Task *tes.Task `protobuf:"bytes,19,opt,name=task,oneof"` + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_events_events_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (*Event_State) isEvent_Data() {} -func (*Event_StartTime) isEvent_Data() {} -func (*Event_EndTime) isEvent_Data() {} -func (*Event_Outputs) isEvent_Data() {} -func (*Event_Metadata) isEvent_Data() {} -func (*Event_ExitCode) isEvent_Data() {} -func (*Event_Stdout) isEvent_Data() {} -func (*Event_Stderr) isEvent_Data() {} -func (*Event_SystemLog) isEvent_Data() {} -func (*Event_Task) isEvent_Data() {} +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_events_events_proto_rawDescGZIP(), []int{3} +} -func (m *Event) GetData() isEvent_Data { - if m != nil { - return m.Data +func (x *Event) GetId() string { + if x != nil { + return x.Id } - return nil + return "" } -func (m *Event) GetId() string { - if m != nil { - return m.Id +func (x *Event) GetTimestamp() string { + if x != nil { + return x.Timestamp } return "" } -func (m *Event) GetTimestamp() string { +func (m *Event) GetData() isEvent_Data { if m != nil { - return m.Timestamp + return m.Data } - return "" + return nil } -func (m *Event) GetState() tes.State { - if x, ok := m.GetData().(*Event_State); ok { +func (x *Event) GetState() tes.State { + if x, ok := x.GetData().(*Event_State); ok { return x.State } - return tes.State_UNKNOWN + return tes.State(0) } -func (m *Event) GetStartTime() string { - if x, ok := m.GetData().(*Event_StartTime); ok { +func (x *Event) GetStartTime() string { + if x, ok := x.GetData().(*Event_StartTime); ok { return x.StartTime } return "" } -func (m *Event) GetEndTime() string { - if x, ok := m.GetData().(*Event_EndTime); ok { +func (x *Event) GetEndTime() string { + if x, ok := x.GetData().(*Event_EndTime); ok { return x.EndTime } return "" } -func (m *Event) GetOutputs() *Outputs { - if x, ok := m.GetData().(*Event_Outputs); ok { +func (x *Event) GetOutputs() *Outputs { + if x, ok := x.GetData().(*Event_Outputs); ok { return x.Outputs } return nil } -func (m *Event) GetMetadata() *Metadata { - if x, ok := m.GetData().(*Event_Metadata); ok { +func (x *Event) GetMetadata() *Metadata { + if x, ok := x.GetData().(*Event_Metadata); ok { return x.Metadata } return nil } -func (m *Event) GetExitCode() int32 { - if x, ok := m.GetData().(*Event_ExitCode); ok { +func (x *Event) GetExitCode() int32 { + if x, ok := x.GetData().(*Event_ExitCode); ok { return x.ExitCode } return 0 } -func (m *Event) GetStdout() string { - if x, ok := m.GetData().(*Event_Stdout); ok { +func (x *Event) GetStdout() string { + if x, ok := x.GetData().(*Event_Stdout); ok { return x.Stdout } return "" } -func (m *Event) GetStderr() string { - if x, ok := m.GetData().(*Event_Stderr); ok { +func (x *Event) GetStderr() string { + if x, ok := x.GetData().(*Event_Stderr); ok { return x.Stderr } return "" } -func (m *Event) GetSystemLog() *SystemLog { - if x, ok := m.GetData().(*Event_SystemLog); ok { +func (x *Event) GetSystemLog() *SystemLog { + if x, ok := x.GetData().(*Event_SystemLog); ok { return x.SystemLog } return nil } -func (m *Event) GetTask() *tes.Task { - if x, ok := m.GetData().(*Event_Task); ok { +func (x *Event) GetTask() *tes.Task { + if x, ok := x.GetData().(*Event_Task); ok { return x.Task } return nil } -func (m *Event) GetAttempt() uint32 { - if m != nil { - return m.Attempt +func (x *Event) GetAttempt() uint32 { + if x != nil { + return x.Attempt } return 0 } -func (m *Event) GetIndex() uint32 { - if m != nil { - return m.Index +func (x *Event) GetIndex() uint32 { + if x != nil { + return x.Index } return 0 } -func (m *Event) GetType() Type { - if m != nil { - return m.Type +func (x *Event) GetType() Type { + if x != nil { + return x.Type } return Type_UNKNOWN } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Event) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Event_OneofMarshaler, _Event_OneofUnmarshaler, _Event_OneofSizer, []interface{}{ - (*Event_State)(nil), - (*Event_StartTime)(nil), - (*Event_EndTime)(nil), - (*Event_Outputs)(nil), - (*Event_Metadata)(nil), - (*Event_ExitCode)(nil), - (*Event_Stdout)(nil), - (*Event_Stderr)(nil), - (*Event_SystemLog)(nil), - (*Event_Task)(nil), - } +type isEvent_Data interface { + isEvent_Data() } -func _Event_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Event) - // data - switch x := m.Data.(type) { - case *Event_State: - b.EncodeVarint(3<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.State)) - case *Event_StartTime: - b.EncodeVarint(4<<3 | proto.WireBytes) - b.EncodeStringBytes(x.StartTime) - case *Event_EndTime: - b.EncodeVarint(5<<3 | proto.WireBytes) - b.EncodeStringBytes(x.EndTime) - case *Event_Outputs: - b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Outputs); err != nil { - return err - } - case *Event_Metadata: - b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Metadata); err != nil { - return err - } - case *Event_ExitCode: - b.EncodeVarint(10<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.ExitCode)) - case *Event_Stdout: - b.EncodeVarint(13<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Stdout) - case *Event_Stderr: - b.EncodeVarint(14<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Stderr) - case *Event_SystemLog: - b.EncodeVarint(15<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.SystemLog); err != nil { - return err - } - case *Event_Task: - b.EncodeVarint(19<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Task); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Event.Data has unexpected type %T", x) - } - return nil +type Event_State struct { + State tes.State `protobuf:"varint,3,opt,name=state,proto3,enum=tes.State,oneof"` } -func _Event_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Event) - switch tag { - case 3: // data.state - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Data = &Event_State{tes.State(x)} - return true, err - case 4: // data.start_time - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Data = &Event_StartTime{x} - return true, err - case 5: // data.end_time - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Data = &Event_EndTime{x} - return true, err - case 6: // data.outputs - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Outputs) - err := b.DecodeMessage(msg) - m.Data = &Event_Outputs{msg} - return true, err - case 7: // data.metadata - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Metadata) - err := b.DecodeMessage(msg) - m.Data = &Event_Metadata{msg} - return true, err - case 10: // data.exit_code - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Data = &Event_ExitCode{int32(x)} - return true, err - case 13: // data.stdout - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Data = &Event_Stdout{x} - return true, err - case 14: // data.stderr - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Data = &Event_Stderr{x} - return true, err - case 15: // data.system_log - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(SystemLog) - err := b.DecodeMessage(msg) - m.Data = &Event_SystemLog{msg} - return true, err - case 19: // data.task - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(tes.Task) - err := b.DecodeMessage(msg) - m.Data = &Event_Task{msg} - return true, err - default: - return false, nil - } -} - -func _Event_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Event) - // data - switch x := m.Data.(type) { - case *Event_State: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.State)) - case *Event_StartTime: - n += proto.SizeVarint(4<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.StartTime))) - n += len(x.StartTime) - case *Event_EndTime: - n += proto.SizeVarint(5<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.EndTime))) - n += len(x.EndTime) - case *Event_Outputs: - s := proto.Size(x.Outputs) - n += proto.SizeVarint(6<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Event_Metadata: - s := proto.Size(x.Metadata) - n += proto.SizeVarint(7<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Event_ExitCode: - n += proto.SizeVarint(10<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.ExitCode)) - case *Event_Stdout: - n += proto.SizeVarint(13<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Stdout))) - n += len(x.Stdout) - case *Event_Stderr: - n += proto.SizeVarint(14<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Stderr))) - n += len(x.Stderr) - case *Event_SystemLog: - s := proto.Size(x.SystemLog) - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Event_Task: - s := proto.Size(x.Task) - n += proto.SizeVarint(19<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +type Event_StartTime struct { + StartTime string `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3,oneof"` } -type WriteEventResponse struct { +type Event_EndTime struct { + EndTime string `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3,oneof"` } -func (m *WriteEventResponse) Reset() { *m = WriteEventResponse{} } -func (m *WriteEventResponse) String() string { return proto.CompactTextString(m) } -func (*WriteEventResponse) ProtoMessage() {} -func (*WriteEventResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +type Event_Outputs struct { + Outputs *Outputs `protobuf:"bytes,6,opt,name=outputs,proto3,oneof"` +} -func init() { - proto.RegisterType((*Metadata)(nil), "events.Metadata") - proto.RegisterType((*Outputs)(nil), "events.Outputs") - proto.RegisterType((*SystemLog)(nil), "events.SystemLog") - proto.RegisterType((*Event)(nil), "events.Event") - proto.RegisterType((*WriteEventResponse)(nil), "events.WriteEventResponse") - proto.RegisterEnum("events.Type", Type_name, Type_value) +type Event_Metadata struct { + Metadata *Metadata `protobuf:"bytes,7,opt,name=metadata,proto3,oneof"` } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +type Event_ExitCode struct { + ExitCode int32 `protobuf:"varint,10,opt,name=exit_code,json=exitCode,proto3,oneof"` +} -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +type Event_Stdout struct { + Stdout string `protobuf:"bytes,13,opt,name=stdout,proto3,oneof"` +} -// Client API for EventService service +type Event_Stderr struct { + Stderr string `protobuf:"bytes,14,opt,name=stderr,proto3,oneof"` +} -type EventServiceClient interface { - WriteEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*WriteEventResponse, error) +type Event_SystemLog struct { + SystemLog *SystemLog `protobuf:"bytes,15,opt,name=system_log,json=systemLog,proto3,oneof"` } -type eventServiceClient struct { - cc *grpc.ClientConn +type Event_Task struct { + Task *tes.Task `protobuf:"bytes,19,opt,name=task,proto3,oneof"` } -func NewEventServiceClient(cc *grpc.ClientConn) EventServiceClient { - return &eventServiceClient{cc} +func (*Event_State) isEvent_Data() {} + +func (*Event_StartTime) isEvent_Data() {} + +func (*Event_EndTime) isEvent_Data() {} + +func (*Event_Outputs) isEvent_Data() {} + +func (*Event_Metadata) isEvent_Data() {} + +func (*Event_ExitCode) isEvent_Data() {} + +func (*Event_Stdout) isEvent_Data() {} + +func (*Event_Stderr) isEvent_Data() {} + +func (*Event_SystemLog) isEvent_Data() {} + +func (*Event_Task) isEvent_Data() {} + +type WriteEventResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (c *eventServiceClient) WriteEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*WriteEventResponse, error) { - out := new(WriteEventResponse) - err := grpc.Invoke(ctx, "/events.EventService/WriteEvent", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *WriteEventResponse) Reset() { + *x = WriteEventResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_events_events_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return out, nil } -// Server API for EventService service - -type EventServiceServer interface { - WriteEvent(context.Context, *Event) (*WriteEventResponse, error) +func (x *WriteEventResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer) { - s.RegisterService(&_EventService_serviceDesc, srv) -} +func (*WriteEventResponse) ProtoMessage() {} -func _EventService_WriteEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Event) - if err := dec(in); err != nil { - return nil, err +func (x *WriteEventResponse) ProtoReflect() protoreflect.Message { + mi := &file_events_events_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - if interceptor == nil { - return srv.(EventServiceServer).WriteEvent(ctx, in) + return mi.MessageOf(x) +} + +// Deprecated: Use WriteEventResponse.ProtoReflect.Descriptor instead. +func (*WriteEventResponse) Descriptor() ([]byte, []int) { + return file_events_events_proto_rawDescGZIP(), []int{4} +} + +var File_events_events_proto protoreflect.FileDescriptor + +var file_events_events_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x0d, 0x74, + 0x65, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x08, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x33, 0x0a, 0x07, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, + 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x4c, 0x6f, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x09, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4c, 0x6f, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x12, 0x35, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x4c, 0x6f, 0x67, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0xf6, 0x03, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x22, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x74, 0x65, 0x73, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x1b, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x07, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x48, 0x00, + 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x09, 0x65, 0x78, 0x69, + 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, + 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, + 0x75, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, + 0x75, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x32, 0x0a, 0x0a, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x4c, 0x6f, 0x67, 0x48, 0x00, 0x52, 0x09, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4c, 0x6f, 0x67, + 0x12, 0x1f, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, + 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x04, 0x74, 0x61, 0x73, + 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x20, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x0c, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x14, 0x0a, 0x12, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2a, 0x84, 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x41, 0x53, 0x4b, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x41, 0x53, 0x4b, 0x5f, + 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, + 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x12, + 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x53, 0x10, + 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, + 0x54, 0x41, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, + 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x06, 0x12, 0x15, 0x0a, + 0x11, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x49, + 0x4d, 0x45, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, + 0x5f, 0x45, 0x58, 0x49, 0x54, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x08, 0x12, 0x13, 0x0a, 0x0f, + 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x44, 0x4f, 0x55, 0x54, 0x10, + 0x0b, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x53, 0x54, + 0x44, 0x45, 0x52, 0x52, 0x10, 0x0c, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, + 0x5f, 0x4c, 0x4f, 0x47, 0x10, 0x0d, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x0e, 0x32, 0x49, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0d, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x1a, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x68, 0x73, 0x75, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x2d, 0x62, 0x69, 0x6f, 0x2f, + 0x66, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_events_events_proto_rawDescOnce sync.Once + file_events_events_proto_rawDescData = file_events_events_proto_rawDesc +) + +func file_events_events_proto_rawDescGZIP() []byte { + file_events_events_proto_rawDescOnce.Do(func() { + file_events_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_events_events_proto_rawDescData) + }) + return file_events_events_proto_rawDescData +} + +var file_events_events_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_events_events_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_events_events_proto_goTypes = []interface{}{ + (Type)(0), // 0: events.Type + (*Metadata)(nil), // 1: events.Metadata + (*Outputs)(nil), // 2: events.Outputs + (*SystemLog)(nil), // 3: events.SystemLog + (*Event)(nil), // 4: events.Event + (*WriteEventResponse)(nil), // 5: events.WriteEventResponse + nil, // 6: events.Metadata.ValueEntry + nil, // 7: events.SystemLog.FieldsEntry + (*tes.OutputFileLog)(nil), // 8: tes.OutputFileLog + (tes.State)(0), // 9: tes.State + (*tes.Task)(nil), // 10: tes.Task +} +var file_events_events_proto_depIdxs = []int32{ + 6, // 0: events.Metadata.value:type_name -> events.Metadata.ValueEntry + 8, // 1: events.Outputs.value:type_name -> tes.OutputFileLog + 7, // 2: events.SystemLog.fields:type_name -> events.SystemLog.FieldsEntry + 9, // 3: events.Event.state:type_name -> tes.State + 2, // 4: events.Event.outputs:type_name -> events.Outputs + 1, // 5: events.Event.metadata:type_name -> events.Metadata + 3, // 6: events.Event.system_log:type_name -> events.SystemLog + 10, // 7: events.Event.task:type_name -> tes.Task + 0, // 8: events.Event.type:type_name -> events.Type + 4, // 9: events.EventService.WriteEvent:input_type -> events.Event + 5, // 10: events.EventService.WriteEvent:output_type -> events.WriteEventResponse + 10, // [10:11] is the sub-list for method output_type + 9, // [9:10] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_events_events_proto_init() } +func file_events_events_proto_init() { + if File_events_events_proto != nil { + return } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/events.EventService/WriteEvent", + if !protoimpl.UnsafeEnabled { + file_events_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Metadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_events_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Outputs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_events_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SystemLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_events_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_events_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteEventResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventServiceServer).WriteEvent(ctx, req.(*Event)) + file_events_events_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*Event_State)(nil), + (*Event_StartTime)(nil), + (*Event_EndTime)(nil), + (*Event_Outputs)(nil), + (*Event_Metadata)(nil), + (*Event_ExitCode)(nil), + (*Event_Stdout)(nil), + (*Event_Stderr)(nil), + (*Event_SystemLog)(nil), + (*Event_Task)(nil), } - return interceptor(ctx, in, info, handler) -} - -var _EventService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "events.EventService", - HandlerType: (*EventServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "WriteEvent", - Handler: _EventService_WriteEvent_Handler, + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_events_events_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "events.proto", -} - -func init() { proto.RegisterFile("events.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 702 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4b, 0x6f, 0xea, 0x46, - 0x14, 0xc6, 0xbc, 0x39, 0x3c, 0x62, 0x4e, 0x6e, 0xdb, 0x11, 0xf7, 0x46, 0x41, 0xac, 0x50, 0x2b, - 0x11, 0x95, 0xa8, 0x52, 0xd2, 0x1d, 0x05, 0xa7, 0x44, 0x09, 0x50, 0xd9, 0x43, 0x93, 0xae, 0x90, - 0x1b, 0x9f, 0x22, 0x2b, 0xf8, 0x21, 0x7b, 0xa0, 0x61, 0xdf, 0xbf, 0xd2, 0xbf, 0xd8, 0x75, 0x35, - 0x63, 0x1b, 0x68, 0xb2, 0xea, 0x8e, 0xef, 0x31, 0xe7, 0xf1, 0x1d, 0x0b, 0x68, 0xd0, 0x8e, 0x7c, - 0x11, 0x0f, 0xc2, 0x28, 0x10, 0x01, 0x96, 0x13, 0xd4, 0xa9, 0x09, 0x4a, 0xa9, 0xce, 0x97, 0x75, - 0x10, 0xac, 0x37, 0x74, 0x65, 0x87, 0xee, 0x95, 0xed, 0xfb, 0x81, 0xb0, 0x85, 0x1b, 0xf8, 0xa9, - 0xda, 0xfb, 0x13, 0xaa, 0x33, 0x12, 0xb6, 0x63, 0x0b, 0x1b, 0xbf, 0x87, 0xd2, 0xce, 0xde, 0x6c, - 0x89, 0x69, 0xdd, 0x42, 0xbf, 0x3e, 0xfc, 0x3c, 0x48, 0x4b, 0x67, 0x86, 0xc1, 0xaf, 0x52, 0x35, - 0x7c, 0x11, 0xed, 0xcd, 0xc4, 0xd9, 0xb9, 0x01, 0x38, 0x92, 0xa8, 0x43, 0xe1, 0x95, 0xf6, 0x4c, - 0xeb, 0x6a, 0xfd, 0x9a, 0x29, 0x7f, 0xe2, 0xa7, 0xac, 0x64, 0x5e, 0x71, 0x09, 0xf8, 0x31, 0x7f, - 0xa3, 0xf5, 0xae, 0xa1, 0xb2, 0xd8, 0x8a, 0x70, 0x2b, 0x62, 0xec, 0xff, 0xb7, 0x2f, 0x0e, 0xe4, - 0xf0, 0x89, 0x78, 0xe7, 0x6e, 0xe8, 0x31, 0x58, 0xa7, 0x0f, 0x7b, 0x7f, 0x6b, 0x50, 0xb3, 0xf6, - 0xb1, 0x20, 0xef, 0x31, 0x58, 0xcb, 0x76, 0x5e, 0xbc, 0xce, 0xda, 0x79, 0xf1, 0x5a, 0xb6, 0xdb, - 0xd0, 0x8e, 0x36, 0x59, 0x3b, 0x05, 0xf0, 0x07, 0x28, 0xff, 0xe1, 0xd2, 0xc6, 0x89, 0x59, 0x41, - 0x35, 0xb8, 0xc8, 0x16, 0x3b, 0x94, 0x1a, 0xdc, 0x29, 0x3d, 0x59, 0x2d, 0x35, 0x77, 0x6e, 0xa1, - 0x7e, 0x42, 0xff, 0xaf, 0xe5, 0xfe, 0x29, 0x40, 0xc9, 0x90, 0x3d, 0xb0, 0x05, 0x79, 0xd7, 0x49, - 0x1f, 0xe5, 0x5d, 0x07, 0xbf, 0x40, 0x4d, 0xb8, 0x1e, 0xc5, 0xc2, 0xf6, 0xc2, 0xf4, 0xdd, 0x91, - 0xc0, 0x1e, 0x94, 0x62, 0x61, 0x0b, 0x62, 0x85, 0xae, 0xd6, 0x6f, 0x0d, 0x41, 0x25, 0x61, 0x49, - 0x66, 0x9a, 0x33, 0x13, 0x09, 0x2f, 0x01, 0x62, 0x61, 0x47, 0x62, 0x25, 0x9f, 0xb1, 0xa2, 0x2c, - 0x31, 0xcd, 0x99, 0x35, 0xc5, 0x71, 0xd7, 0x23, 0xfc, 0x0c, 0x55, 0xf2, 0x9d, 0x44, 0x2e, 0xa5, - 0x72, 0x85, 0x7c, 0x47, 0x89, 0xdf, 0x41, 0x25, 0x48, 0x62, 0x67, 0xe5, 0xae, 0xd6, 0xaf, 0x0f, - 0xcf, 0xb2, 0x30, 0xd2, 0x6b, 0x48, 0x73, 0xea, 0xc0, 0x01, 0x54, 0xbd, 0xf4, 0xf6, 0xac, 0xa2, - 0xdc, 0xfa, 0xfb, 0x6f, 0x62, 0x9a, 0x33, 0x0f, 0x1e, 0xbc, 0x80, 0x1a, 0xbd, 0xb9, 0x62, 0xf5, - 0x12, 0x38, 0xc4, 0xa0, 0xab, 0xf5, 0x4b, 0x52, 0x96, 0xd4, 0x38, 0x70, 0x08, 0x19, 0x94, 0x63, - 0xe1, 0x04, 0x5b, 0xc1, 0x9a, 0xe9, 0x58, 0x29, 0x4e, 0x15, 0x8a, 0x22, 0xd6, 0x3a, 0x51, 0x28, - 0x8a, 0x70, 0x08, 0x10, 0xab, 0x2b, 0xad, 0x36, 0xc1, 0x9a, 0x9d, 0xa9, 0x21, 0xda, 0x1f, 0xee, - 0xa7, 0x02, 0x38, 0x7c, 0x17, 0x97, 0x50, 0x14, 0x76, 0xfc, 0xca, 0xce, 0x95, 0xbb, 0xa6, 0x42, - 0xe4, 0x76, 0xfc, 0x3a, 0xcd, 0x99, 0x4a, 0x40, 0x06, 0x15, 0x5b, 0x08, 0xf2, 0x42, 0xc1, 0xf4, - 0xae, 0xd6, 0x6f, 0x9a, 0x19, 0x94, 0x27, 0x75, 0x7d, 0x87, 0xde, 0x58, 0x5b, 0xf1, 0x09, 0xc0, - 0x2e, 0x14, 0xc5, 0x3e, 0x24, 0x86, 0xea, 0x2a, 0x8d, 0xac, 0x3d, 0xdf, 0x87, 0x64, 0x2a, 0xe5, - 0xa7, 0x32, 0x14, 0x65, 0x02, 0xbd, 0x4f, 0x80, 0x4f, 0x91, 0x2b, 0x48, 0x1d, 0xdf, 0xa4, 0x38, - 0x0c, 0xfc, 0x98, 0xbe, 0xfd, 0x2b, 0x0f, 0x45, 0x69, 0xc6, 0x3a, 0x54, 0x96, 0xf3, 0x87, 0xf9, - 0xe2, 0x69, 0xae, 0xe7, 0xb0, 0x05, 0xc0, 0x47, 0xd6, 0xc3, 0xca, 0xe2, 0x23, 0x6e, 0xe8, 0x1a, - 0x9e, 0xc3, 0x59, 0x86, 0x4d, 0xbe, 0xe2, 0xf7, 0x33, 0x43, 0xcf, 0x63, 0x1b, 0x9a, 0x8a, 0x34, - 0xe6, 0x93, 0x84, 0x2a, 0xa0, 0x0e, 0x0d, 0x45, 0x2d, 0x96, 0xfc, 0x97, 0x25, 0xb7, 0xf4, 0xe2, - 0xc1, 0x34, 0x33, 0xf8, 0x68, 0x32, 0xe2, 0x23, 0xbd, 0x84, 0xdf, 0xc0, 0xb9, 0xf1, 0x6c, 0x8c, - 0x97, 0x7c, 0x61, 0x9e, 0x16, 0x2c, 0xe3, 0x57, 0xd0, 0x3e, 0x08, 0x87, 0xa2, 0x15, 0xfc, 0x1a, - 0xf0, 0x48, 0x3f, 0xdf, 0xf3, 0xd5, 0x78, 0x31, 0x31, 0xf4, 0xaa, 0x1c, 0xea, 0xa4, 0xce, 0x64, - 0xb1, 0xe4, 0x7a, 0xfd, 0x3d, 0x69, 0x98, 0xa6, 0xde, 0x90, 0xeb, 0x58, 0xbf, 0x59, 0xdc, 0x98, - 0xad, 0x1e, 0x17, 0x3f, 0xeb, 0xcd, 0xc3, 0x98, 0x63, 0xd3, 0x18, 0x71, 0x63, 0xa2, 0xb7, 0x86, - 0xf7, 0xd0, 0x50, 0xb9, 0x58, 0x14, 0xed, 0xdc, 0x17, 0xc2, 0x5b, 0x80, 0x63, 0x58, 0xd8, 0xcc, - 0x62, 0x55, 0xb0, 0xd3, 0xc9, 0xe0, 0xc7, 0x3c, 0x7b, 0xb9, 0xdf, 0xcb, 0xea, 0xdf, 0xeb, 0xfa, - 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0x54, 0xe1, 0xfa, 0xfe, 0x04, 0x00, 0x00, + GoTypes: file_events_events_proto_goTypes, + DependencyIndexes: file_events_events_proto_depIdxs, + EnumInfos: file_events_events_proto_enumTypes, + MessageInfos: file_events_events_proto_msgTypes, + }.Build() + File_events_events_proto = out.File + file_events_events_proto_rawDesc = nil + file_events_events_proto_goTypes = nil + file_events_events_proto_depIdxs = nil } diff --git a/events/events.pb.gw.go b/events/events.pb.gw.go new file mode 100644 index 00000000..abfbc87d --- /dev/null +++ b/events/events.pb.gw.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: events/events.proto + +/* +Package events is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package events + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_EventService_WriteEvent_0(ctx context.Context, marshaler runtime.Marshaler, client EventServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Event + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.WriteEvent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EventService_WriteEvent_0(ctx context.Context, marshaler runtime.Marshaler, server EventServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Event + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.WriteEvent(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterEventServiceHandlerServer registers the http handlers for service EventService to "mux". +// UnaryRPC :call EventServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEventServiceHandlerFromEndpoint instead. +func RegisterEventServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventServiceServer) error { + + mux.Handle("POST", pattern_EventService_WriteEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/events.EventService/WriteEvent", runtime.WithHTTPPathPattern("/events.EventService/WriteEvent")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EventService_WriteEvent_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_EventService_WriteEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterEventServiceHandlerFromEndpoint is same as RegisterEventServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterEventServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterEventServiceHandler(ctx, mux, conn) +} + +// RegisterEventServiceHandler registers the http handlers for service EventService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterEventServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterEventServiceHandlerClient(ctx, mux, NewEventServiceClient(conn)) +} + +// RegisterEventServiceHandlerClient registers the http handlers for service EventService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "EventServiceClient" to call the correct interceptors. +func RegisterEventServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventServiceClient) error { + + mux.Handle("POST", pattern_EventService_WriteEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/events.EventService/WriteEvent", runtime.WithHTTPPathPattern("/events.EventService/WriteEvent")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EventService_WriteEvent_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_EventService_WriteEvent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_EventService_WriteEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"events.EventService", "WriteEvent"}, "")) +) + +var ( + forward_EventService_WriteEvent_0 = runtime.ForwardResponseMessage +) diff --git a/events/events.proto b/events/events.proto index bb9e8d02..5772d68f 100644 --- a/events/events.proto +++ b/events/events.proto @@ -2,8 +2,9 @@ syntax = "proto3"; package events; -import "tes.proto"; -import "google/api/annotations.proto"; +option go_package = "github.com/ohsu-comp-bio/funnel/events"; + +import "tes/tes.proto"; message Metadata { map value = 1; @@ -22,7 +23,7 @@ message SystemLog { enum Type { UNKNOWN = 0; TASK_STATE = 1; - TASK_START_TIME = 2; + TASK_START_TIME = 2; TASK_END_TIME = 3; TASK_OUTPUTS = 4; TASK_METADATA = 5; diff --git a/events/events_grpc.pb.go b/events/events_grpc.pb.go new file mode 100644 index 00000000..9f2bd143 --- /dev/null +++ b/events/events_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.3 +// source: events/events.proto + +package events + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + EventService_WriteEvent_FullMethodName = "/events.EventService/WriteEvent" +) + +// EventServiceClient is the client API for EventService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type EventServiceClient interface { + WriteEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*WriteEventResponse, error) +} + +type eventServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient { + return &eventServiceClient{cc} +} + +func (c *eventServiceClient) WriteEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*WriteEventResponse, error) { + out := new(WriteEventResponse) + err := c.cc.Invoke(ctx, EventService_WriteEvent_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EventServiceServer is the server API for EventService service. +// All implementations should embed UnimplementedEventServiceServer +// for forward compatibility +type EventServiceServer interface { + WriteEvent(context.Context, *Event) (*WriteEventResponse, error) +} + +// UnimplementedEventServiceServer should be embedded to have forward compatible implementations. +type UnimplementedEventServiceServer struct { +} + +func (UnimplementedEventServiceServer) WriteEvent(context.Context, *Event) (*WriteEventResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteEvent not implemented") +} + +// UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to EventServiceServer will +// result in compilation errors. +type UnsafeEventServiceServer interface { + mustEmbedUnimplementedEventServiceServer() +} + +func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer) { + s.RegisterService(&EventService_ServiceDesc, srv) +} + +func _EventService_WriteEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Event) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventServiceServer).WriteEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EventService_WriteEvent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventServiceServer).WriteEvent(ctx, req.(*Event)) + } + return interceptor(ctx, in, info, handler) +} + +// EventService_ServiceDesc is the grpc.ServiceDesc for EventService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var EventService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "events.EventService", + HandlerType: (*EventServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "WriteEvent", + Handler: _EventService_WriteEvent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "events/events.proto", +} diff --git a/events/executor.go b/events/executor.go index 03e1f1e9..2928b43e 100644 --- a/events/executor.go +++ b/events/executor.go @@ -2,6 +2,7 @@ package events import ( "context" + "fmt" "io" "time" @@ -81,43 +82,64 @@ func NewExecutorWriter(taskID string, attempt uint32, index uint32, w Writer) *E } // StartTime updates the task's start time log. -func (ew *ExecutorWriter) StartTime(t time.Time) error { - return ew.out.WriteEvent(context.Background(), ew.gen.StartTime(t)) +func (ew *ExecutorWriter) StartTime(t time.Time) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.StartTime(t)); err != nil { + fmt.Printf("Detected error while writing start-time system log message: %s\n", err) + fmt.Printf("Original start-time: %s\n", t) + } } // EndTime updates the task's end time log. -func (ew *ExecutorWriter) EndTime(t time.Time) error { - return ew.out.WriteEvent(context.Background(), ew.gen.EndTime(t)) +func (ew *ExecutorWriter) EndTime(t time.Time) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.EndTime(t)); err != nil { + fmt.Printf("Detected error while writing end-time system log message: %s\n", err) + fmt.Printf("Original end-time: %s\n", t) + } } // ExitCode updates an executor's exit code log. -func (ew *ExecutorWriter) ExitCode(x int) error { - return ew.out.WriteEvent(context.Background(), ew.gen.ExitCode(x)) +func (ew *ExecutorWriter) ExitCode(x int) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.ExitCode(x)); err != nil { + fmt.Printf("Detected error while writing exit-code system log message: %s\n", err) + fmt.Printf("Original exit-code: %d\n", x) + } } // Stdout appends to an executor's stdout log. -func (ew *ExecutorWriter) Stdout(s string) error { - return ew.out.WriteEvent(context.Background(), ew.gen.Stdout(s)) +func (ew *ExecutorWriter) Stdout(s string) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.Stdout(s)); err != nil { + fmt.Printf("Detected error while writing system log message to STDERR: %s\n", err) + fmt.Printf("Original system log message: %s\n", s) + } } // Stderr appends to an executor's stderr log. -func (ew *ExecutorWriter) Stderr(s string) error { - return ew.out.WriteEvent(context.Background(), ew.gen.Stderr(s)) +func (ew *ExecutorWriter) Stderr(s string) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.Stderr(s)); err != nil { + fmt.Printf("Detected error while writing system log message to STDERR: %s\n", err) + fmt.Printf("Original system log message: %s\n", s) + } } // Info writes an info level system log message. -func (ew *ExecutorWriter) Info(msg string, args ...interface{}) error { - return ew.sys.Info(msg, args...) +func (ew *ExecutorWriter) Info(msg string, args ...interface{}) { + if err := ew.sys.Info(msg, args...); err != nil { + fmt.Printf("Detected error while writing info-level system log message: %s\n", err) + } } // Debug writes a debug level system log message. -func (ew *ExecutorWriter) Debug(msg string, args ...interface{}) error { - return ew.sys.Debug(msg, args...) +func (ew *ExecutorWriter) Debug(msg string, args ...interface{}) { + if err := ew.sys.Debug(msg, args...); err != nil { + fmt.Printf("Detected error while writing debug-level system log message: %s\n", err) + } } // Error writes an error level system log message. -func (ew *ExecutorWriter) Error(msg string, args ...interface{}) error { - return ew.sys.Error(msg, args...) +func (ew *ExecutorWriter) Error(msg string, args ...interface{}) { + if err := ew.sys.Error(msg, args...); err != nil { + fmt.Printf("Detected error while writing error-level system log message: %s\n", err) + } } // LogTail returns stdout/err io.Writers which will track the @@ -161,8 +183,12 @@ func LogTail(ctx context.Context, taskID string, attempt, index uint32, size int go func() { <-ctx.Done() - flush(stdoutbuf, Type_EXECUTOR_STDOUT) - flush(stdoutbuf, Type_EXECUTOR_STDERR) + if err := flush(stdoutbuf, Type_EXECUTOR_STDOUT); err != nil { + fmt.Printf("Error detected while writing to STDOUT: %s\n", err) + } + if err := flush(stdoutbuf, Type_EXECUTOR_STDERR); err != nil { + fmt.Printf("Error detected while writing to STDERR: %s\n", err) + } }() return stdoutbuf, stderrbuf @@ -232,7 +258,9 @@ func StreamLogTail(ctx context.Context, taskID string, attempt, index uint32, si go func() { for e := range eventch { ctx, cancel := context.WithTimeout(context.Background(), time.Second*5) - out.WriteEvent(ctx, e) + if err := out.WriteEvent(ctx, e); err != nil { + fmt.Printf("Error detected while writing event: %s\n", err) + } cancel() } }() @@ -258,12 +286,16 @@ func StreamLogTail(ctx context.Context, taskID string, attempt, index uint32, si flushboth(immediate) } case b := <-stdoutch: - stdoutbuf.Write(b) + if _, err := stdoutbuf.Write(b); err != nil { + fmt.Printf("Error detected while writing to STDOUT buffer: %s\n", err) + } if limiter.Allow() { flushboth(immediate) } case b := <-stderrch: - stderrbuf.Write(b) + if _, err := stderrbuf.Write(b); err != nil { + fmt.Printf("Error detected while writing to STDERR buffer: %s\n", err) + } if limiter.Allow() { flushboth(immediate) } diff --git a/events/json.go b/events/json.go index b2912c11..3c7a0652 100644 --- a/events/json.go +++ b/events/json.go @@ -1,25 +1,26 @@ package events import ( - "bytes" - - "github.com/golang/protobuf/jsonpb" + "google.golang.org/protobuf/encoding/protojson" ) // Marshaler provides a default JSON marshaler. -var Marshaler = &jsonpb.Marshaler{ - EnumsAsInts: false, - EmitDefaults: false, - Indent: "\t", +var Marshaler = &protojson.MarshalOptions{ + UseEnumNumbers: false, + EmitDefaultValues: false, + Indent: "\t", } // Marshal marshals the event to JSON. func Marshal(ev *Event) (string, error) { - return Marshaler.MarshalToString(ev) + if b, err := Marshaler.Marshal(ev); err != nil { + return "", err + } else { + return string(b), nil + } } // Unmarshal unmarshals the event from JSON. func Unmarshal(b []byte, ev *Event) error { - r := bytes.NewReader(b) - return jsonpb.Unmarshal(r, ev) + return protojson.Unmarshal(b, ev) } diff --git a/events/kafka.go b/events/kafka.go index 52768142..094bf153 100644 --- a/events/kafka.go +++ b/events/kafka.go @@ -2,8 +2,9 @@ package events import ( "context" + "fmt" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "github.com/ohsu-comp-bio/funnel/config" ) @@ -77,12 +78,16 @@ func NewKafkaReader(ctx context.Context, conf config.Kafka, w Writer) (*KafkaRea go func() { for msg := range p.Messages() { ev := &Event{} - err := Unmarshal(msg.Value, ev) - if err != nil { - // TODO + + if err := Unmarshal(msg.Value, ev); err != nil { + fmt.Printf("Error detected while unmarshaling Kafka event message data: %s\n", err) + continue + } + + if err := w.WriteEvent(context.Background(), ev); err != nil { + fmt.Printf("Error detected while writing Kafka event: %s\n", err) continue } - w.WriteEvent(context.Background(), ev) } }() diff --git a/events/pubsub.go b/events/pubsub.go index 266bb77b..da973ef1 100644 --- a/events/pubsub.go +++ b/events/pubsub.go @@ -2,6 +2,7 @@ package events import ( "context" + "fmt" "cloud.google.com/go/pubsub" "github.com/ohsu-comp-bio/funnel/config" @@ -97,15 +98,19 @@ func ReadPubSub(ctx context.Context, conf config.PubSub, subname string, w Write } } - sub.Receive(ctx, func(ctx oldctx.Context, m *pubsub.Message) { + return sub.Receive(ctx, func(ctx oldctx.Context, m *pubsub.Message) { ev := &Event{} - err := Unmarshal(m.Data, ev) - if err != nil { + + if err := Unmarshal(m.Data, ev); err != nil { + fmt.Printf("Error detected while unmarshaling PubSub event message data: %s\n", err) + return + } + + if err := w.WriteEvent(context.Background(), ev); err != nil { + fmt.Printf("Error detected while writing PubSub event: %s\n", err) return } - w.WriteEvent(context.Background(), ev) + m.Ack() }) - - return nil } diff --git a/events/retry.go b/events/retry.go deleted file mode 100644 index ac8a8310..00000000 --- a/events/retry.go +++ /dev/null @@ -1,18 +0,0 @@ -package events - -import ( - "context" - - "github.com/ohsu-comp-bio/funnel/util" -) - -type retrier struct { - *util.Retrier - Writer Writer -} - -func (r *retrier) WriteEvent(ctx context.Context, e *Event) error { - return r.Retry(ctx, func() error { - return r.Writer.WriteEvent(ctx, e) - }) -} diff --git a/events/systemlog.go b/events/systemlog.go index 5efc99c5..1e2455ec 100644 --- a/events/systemlog.go +++ b/events/systemlog.go @@ -68,8 +68,7 @@ func (sle *SystemLogWriter) Warn(msg string, args ...interface{}) error { // ("key", value, "key2", value2) => {"key": value, "key2", value2} func fields(args ...interface{}) map[string]string { ss := make(map[string]string) - si := make(map[string]interface{}) - si = util.ArgListToMap(args...) + si := util.ArgListToMap(args...) for k, v := range si { ss[k] = fmt.Sprintf("%+v", v) } @@ -99,6 +98,6 @@ func escape(s string) string { } func safeKey(s string) string { - re := regexp.MustCompile("[\\s]+") + re := regexp.MustCompile(`[\s]+`) return re.ReplaceAllString(s, "_") } diff --git a/events/task.go b/events/task.go index 7b5e948a..c059235d 100644 --- a/events/task.go +++ b/events/task.go @@ -2,6 +2,7 @@ package events import ( "context" + "fmt" "time" "github.com/ohsu-comp-bio/funnel/tes" @@ -83,48 +84,75 @@ func NewTaskWriter(taskID string, attempt uint32, w Writer) *TaskWriter { } // State sets the state of the task. -func (ew *TaskWriter) State(s tes.State) error { - return ew.out.WriteEvent(context.Background(), ew.gen.State(s)) +func (ew *TaskWriter) State(s tes.State) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.State(s)); err != nil { + fmt.Printf("Detected error while writing task state event: %s\n", err) + fmt.Printf("Original state: %s\n", s) + } } // StartTime updates the task's start time log. -func (ew *TaskWriter) StartTime(t time.Time) error { - return ew.out.WriteEvent(context.Background(), ew.gen.StartTime(t)) +func (ew *TaskWriter) StartTime(t time.Time) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.StartTime(t)); err != nil { + fmt.Printf("Detected error while writing task start-time event: %s\n", err) + fmt.Printf("Original start-time: %s\n", t) + } } // EndTime updates the task's end time log. -func (ew *TaskWriter) EndTime(t time.Time) error { - return ew.out.WriteEvent(context.Background(), ew.gen.EndTime(t)) +func (ew *TaskWriter) EndTime(t time.Time) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.EndTime(t)); err != nil { + fmt.Printf("Detected error while writing task end-time event: %s\n", err) + fmt.Printf("Original end-time: %s\n", t) + } } // Outputs updates the task's output file log. -func (ew *TaskWriter) Outputs(f []*tes.OutputFileLog) error { - return ew.out.WriteEvent(context.Background(), ew.gen.Outputs(f)) +func (ew *TaskWriter) Outputs(f []*tes.OutputFileLog) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.Outputs(f)); err != nil { + fmt.Printf("Detected error while writing task outputs event: %s\n", err) + fmt.Printf("Original task outputs: %s\n", f) + } } // Metadata updates the task's metadata log. -func (ew *TaskWriter) Metadata(m map[string]string) error { - return ew.out.WriteEvent(context.Background(), ew.gen.Metadata(m)) +func (ew *TaskWriter) Metadata(m map[string]string) { + if err := ew.out.WriteEvent(context.Background(), ew.gen.Metadata(m)); err != nil { + fmt.Printf("Detected error while writing task metadata event: %s\n", err) + fmt.Printf("Original task metadata: %v\n", m) + } } // Info creates an info level system log message. -func (ew *TaskWriter) Info(msg string, args ...interface{}) error { - return ew.sys.Info(msg, args...) +func (ew *TaskWriter) Info(msg string, args ...interface{}) { + if err := ew.sys.Info(msg, args...); err != nil { + fmt.Printf("Detected error while writing task info event: %s\n", err) + fmt.Printf("Original task info message: %v\n", msg) + } } // Debug creates a debug level system log message. -func (ew *TaskWriter) Debug(msg string, args ...interface{}) error { - return ew.sys.Debug(msg, args...) +func (ew *TaskWriter) Debug(msg string, args ...interface{}) { + if err := ew.sys.Debug(msg, args...); err != nil { + fmt.Printf("Detected error while writing task debug event: %s\n", err) + fmt.Printf("Original task debug message: %v\n", msg) + } } // Error creates an error level system log message. -func (ew *TaskWriter) Error(msg string, args ...interface{}) error { - return ew.sys.Error(msg, args...) +func (ew *TaskWriter) Error(msg string, args ...interface{}) { + if err := ew.sys.Error(msg, args...); err != nil { + fmt.Printf("Detected error while writing task error event: %s\n", err) + fmt.Printf("Original task error message: %v\n", msg) + } } // Warn creates a warning level system log message. -func (ew *TaskWriter) Warn(msg string, args ...interface{}) error { - return ew.sys.Warn(msg, args...) +func (ew *TaskWriter) Warn(msg string, args ...interface{}) { + if err := ew.sys.Warn(msg, args...); err != nil { + fmt.Printf("Detected error while writing task warning event: %s\n", err) + fmt.Printf("Original task warning message: %v\n", msg) + } } // NewExecutorWriter returns a new ExecutorEventWriter instance that inherits diff --git a/examples/capture-stdout-stderr.json b/examples/capture-stdout-stderr.json index c78ca795..56c89f92 100644 --- a/examples/capture-stdout-stderr.json +++ b/examples/capture-stdout-stderr.json @@ -31,7 +31,7 @@ "image": "alpine", "command": ["sh", "-c", "md5sum /tmp/in | tee /dev/stderr"], "stdout": "/tmp/out", - "stdout": "/tmp/err" + "stderr": "/tmp/err" } ] } diff --git a/examples/examples.go b/examples/examples.go index ddcc1a2c..cca50115 100644 --- a/examples/examples.go +++ b/examples/examples.go @@ -10,18 +10,18 @@ import ( var examples = buildExamples() -func buildExamples() map[string]string { - examples := map[string]string{} +func buildExamples() map[string][]byte { + examples := map[string][]byte{} for _, n := range intern.AssetNames() { sn := path.Base(n) sn = strings.TrimSuffix(sn, path.Ext(sn)) b := intern.MustAsset(n) - examples[sn] = string(b) + examples[sn] = b } return examples } // Examples returns a set of example tasks. -func Examples() map[string]string { +func Examples() map[string][]byte { return examples } diff --git a/examples/examples_test.go b/examples/examples_test.go index bc58bda9..4499dde3 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -3,14 +3,14 @@ package examples import ( "testing" - "github.com/golang/protobuf/jsonpb" "github.com/ohsu-comp-bio/funnel/tes" + "google.golang.org/protobuf/encoding/protojson" ) func TestExamplesAreValid(t *testing.T) { for en, tb := range Examples() { var task tes.Task - err := jsonpb.UnmarshalString(tb, &task) + err := protojson.Unmarshal(tb, &task) if err != nil { t.Fatal("unmarshal failed", en, err) } diff --git a/examples/internal/bundle.go b/examples/internal/bundle.go index a5345d27..0e65ffab 100644 --- a/examples/internal/bundle.go +++ b/examples/internal/bundle.go @@ -1,4 +1,4 @@ -// Package examples Code generated by go-bindata. (@generated) DO NOT EDIT. +// Code generated for package examples by go-bindata DO NOT EDIT. (@generated) // sources: // examples/capture-stdout-stderr.json // examples/google-storage.json @@ -16,7 +16,6 @@ import ( "compress/gzip" "fmt" "io" - "io/ioutil" "os" "path/filepath" "strings" @@ -26,7 +25,7 @@ import ( func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { - return nil, fmt.Errorf("read %q: %v", name, err) + return nil, fmt.Errorf("Read %q: %v", name, err) } var buf bytes.Buffer @@ -34,7 +33,7 @@ func bindataRead(data []byte, name string) ([]byte, error) { clErr := gz.Close() if err != nil { - return nil, fmt.Errorf("read %q: %v", name, err) + return nil, fmt.Errorf("Read %q: %v", name, err) } if clErr != nil { return nil, err @@ -70,7 +69,7 @@ func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } -// ModTime return file modify time +// Mode return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } @@ -85,7 +84,7 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _examplesCaptureStdoutStderrJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x92\x3f\x0f\xda\x30\x10\xc5\xf7\x7c\x8a\x27\xcf\x94\x4c\x5d\x98\xdb\x4a\x48\xdd\x18\x2b\x06\x2b\x3e\x88\xa5\xf8\x8f\xec\x73\x05\xa2\x7c\xf7\xea\x9c\xa4\x01\x54\x10\x2c\x11\xba\x7b\xf7\x78\xbf\x3b\x5f\x1a\x40\x79\xed\x48\x6d\xa0\x76\x6c\x42\x61\x68\x6f\xb0\x63\x43\x29\xa1\xd3\x91\x4b\x22\xb5\x12\x99\xa1\xdc\x25\x1b\xd9\x06\x2f\xea\x6f\xe4\x82\xcf\x9c\x34\x53\x9e\x84\xd6\x1f\x91\x17\x93\x3c\x9a\xc8\xcf\x12\x87\xa0\x8d\xf4\xb9\x27\x07\x9d\x11\x0a\xc7\xc2\x38\xd8\x81\xf2\x7a\xfc\x03\xeb\x63\xe1\xac\x36\xf8\xd5\x00\xc0\xa5\x7e\x6f\xf2\xd5\x7e\x95\xd6\xf2\x43\x9e\xad\x74\xc1\x01\x5d\x70\x4e\x7b\xb3\x46\xcb\x2e\xb6\x75\x08\xae\x64\x06\x9d\x6c\x66\x04\x2f\x19\xd0\x87\xcc\xc8\xe7\xcc\xe4\xd6\x8b\x67\x49\x83\x78\x49\xaa\x4d\xdb\x2e\x06\x8b\x82\xcf\xb1\x86\xf9\xb1\xfd\xf9\x7d\xa9\x46\xcd\xbd\x54\xa7\x09\x55\xeb\xd7\x06\xd8\x57\xb2\x11\xf6\x05\xda\xb8\xb5\xa7\x6c\xd3\x65\xc2\x61\x86\x83\x9d\x77\x4e\xa6\x2e\xb8\x0b\xd1\x92\x11\xfc\x1a\x61\xba\xc2\xa7\xac\x8f\x31\xde\x80\x15\xfd\x48\xbb\x7a\x8a\x46\x29\xbd\x42\x93\x47\xf2\x11\x5a\x1d\xf8\x1c\xed\x2e\xc6\x1b\x68\xa2\x7f\x38\x24\x9d\xa8\x2b\x1c\xd2\x7f\x4e\x69\x9d\x3e\x56\x47\x3d\x44\xeb\x69\xf1\x9c\xb8\x64\x42\xe5\x5e\xad\xa0\xbe\x74\xf2\x75\xe6\x6b\x2e\x6e\x7e\xa5\xf8\x03\x26\x42\x6b\xe8\xf7\x9c\x75\xff\xcf\x62\xba\xcb\xed\xce\x9f\xf5\xee\x43\x37\xd7\xe6\x6f\x00\x00\x00\xff\xff\x94\x21\xf6\x91\xe3\x03\x00\x00") +var _examplesCaptureStdoutStderrJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x92\x3f\x0f\xda\x30\x10\xc5\xf7\x7c\x8a\x27\xcf\x94\x4c\x5d\x98\xdb\x4a\x48\xdd\x18\x2b\x06\x2b\x3e\x88\xa5\xf8\x8f\xec\x73\x05\xa2\x7c\xf7\xea\x9c\xa4\xa1\x08\x10\x2c\x11\xba\x7b\xf7\x78\xbf\x3b\x5f\x1a\x40\x79\xed\x48\x6d\xa0\x76\x6c\x42\x61\x68\x6f\xb0\x63\x43\x29\xa1\xd3\x91\x4b\x22\xb5\x12\x99\xa1\xdc\x25\x1b\xd9\x06\x2f\xea\x6f\xe4\x82\xcf\x9c\x34\x53\x9e\x84\xd6\x1f\x91\x17\x93\x3c\x9a\xc8\xcf\x12\x87\xa0\x8d\xf4\xb9\x27\x07\x9d\x11\x0a\xc7\xc2\x38\xd8\x81\xf2\x7a\xfc\x03\xeb\x63\xe1\xac\x36\xf8\xd5\x00\xc0\xa5\x7e\x6f\xf2\xd5\x7e\x95\xd6\xf2\x5d\x9e\xad\x74\xc1\x01\x5d\x70\x4e\x7b\xb3\x46\xcb\x2e\xb6\x75\x08\xae\x64\x06\x9d\x6c\x66\x04\x2f\x19\xd0\x87\xcc\xc8\xe7\xcc\xe4\xd6\x8b\x67\x49\x83\x78\x49\xaa\x4d\xdb\x2e\x06\x8b\x82\xcf\xb1\x86\xf9\xb1\xfd\xf9\x7d\xa9\x46\xcd\xbd\x54\xa7\x09\x55\xeb\xd7\x06\xd8\x57\xb2\x11\xf6\x05\xda\xb8\xb5\xa7\x6c\xd3\x65\xc2\x61\x86\x83\x9d\x77\x4e\xa6\x2e\xb8\x0b\xd1\x92\x11\xfc\x1a\x61\xba\xc2\xa7\xac\xf7\x31\xde\x80\x15\xfd\x48\xbb\x7a\x8a\x46\x29\xbd\x42\x93\x47\xf2\x11\x5a\x1d\xf8\x1c\xed\xbf\x18\x6f\xa0\x89\xfe\xee\x90\x74\xa2\xae\x70\x48\x0f\x4e\x69\x9d\x3e\x56\x47\x3d\x44\xeb\x69\xf1\x9c\xb8\x64\x42\xe5\x5e\xad\xa0\xbe\x74\xf2\x75\xe6\x6b\x2e\x6e\x7e\xa5\xf8\x03\x26\x42\x6b\xe8\xf7\x9c\x75\xff\xcf\x62\xba\xcb\xed\xce\x6f\x7b\x22\x7e\x1c\xba\xb9\x36\x7f\x03\x00\x00\xff\xff\xea\xf8\x75\x41\xe3\x03\x00\x00") func examplesCaptureStdoutStderrJsonBytes() ([]byte, error) { return bindataRead( @@ -100,7 +99,7 @@ func examplesCaptureStdoutStderrJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/capture-stdout-stderr.json", size: 995, mode: os.FileMode(420), modTime: time.Unix(1548721562, 0)} + info := bindataFileInfo{name: "examples/capture-stdout-stderr.json", size: 995, mode: os.FileMode(384), modTime: time.Unix(1709286431, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -120,7 +119,7 @@ func examplesGoogleStorageJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/google-storage.json", size: 462, mode: os.FileMode(420), modTime: time.Unix(1548721562, 0)} + info := bindataFileInfo{name: "examples/google-storage.json", size: 462, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -140,7 +139,7 @@ func examplesResourceRequestJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/resource-request.json", size: 299, mode: os.FileMode(420), modTime: time.Unix(1548721562, 0)} + info := bindataFileInfo{name: "examples/resource-request.json", size: 299, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -160,7 +159,7 @@ func examplesInputContentJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/input-content.json", size: 736, mode: os.FileMode(420), modTime: time.Unix(1548721562, 0)} + info := bindataFileInfo{name: "examples/input-content.json", size: 736, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -180,7 +179,7 @@ func examplesHelloWorldJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/hello-world.json", size: 187, mode: os.FileMode(420), modTime: time.Unix(1548721562, 0)} + info := bindataFileInfo{name: "examples/hello-world.json", size: 187, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -200,7 +199,7 @@ func examplesLogStreamingJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/log-streaming.json", size: 304, mode: os.FileMode(420), modTime: time.Unix(1548721562, 0)} + info := bindataFileInfo{name: "examples/log-streaming.json", size: 304, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -220,7 +219,7 @@ func examplesMd5sumJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/md5sum.json", size: 737, mode: os.FileMode(420), modTime: time.Unix(1548721562, 0)} + info := bindataFileInfo{name: "examples/md5sum.json", size: 737, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -240,7 +239,7 @@ func examplesS3Json() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/s3.json", size: 441, mode: os.FileMode(420), modTime: time.Unix(1548721562, 0)} + info := bindataFileInfo{name: "examples/s3.json", size: 441, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -260,7 +259,7 @@ func examplesFullHelloJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/full-hello.json", size: 577, mode: os.FileMode(420), modTime: time.Unix(1548721562, 0)} + info := bindataFileInfo{name: "examples/full-hello.json", size: 577, mode: os.FileMode(384), modTime: time.Unix(1705929562, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -332,11 +331,13 @@ var _bindata = map[string]func() (*asset, error){ // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png +// +// data/ +// foo.txt +// img/ +// a.png +// b.png +// // then AssetDir("data") would return []string{"foo.txt", "img"} // AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("foo.txt") and AssetDir("notexist") would return an error @@ -396,7 +397,7 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) + err = os.WriteFile(_filePath(dir, name), data, info.Mode()) if err != nil { return err } diff --git a/go.mod b/go.mod index a6d5fe54..b4717ce7 100644 --- a/go.mod +++ b/go.mod @@ -3,118 +3,124 @@ module github.com/ohsu-comp-bio/funnel go 1.21 require ( - cloud.google.com/go/datastore v1.11.0 - cloud.google.com/go/pubsub v1.30.0 - github.com/Shopify/sarama v1.26.1 - github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d + cloud.google.com/go/datastore v1.15.0 + cloud.google.com/go/pubsub v1.36.2 + github.com/IBM/sarama v1.43.0 + github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 - github.com/aws/aws-sdk-go v1.13.54 + github.com/aws/aws-sdk-go v1.50.30 github.com/boltdb/bolt v1.3.1 github.com/cenkalti/backoff v2.2.1+incompatible - github.com/dgraph-io/badger/v2 v2.0.1 - github.com/docker/docker v24.0.7+incompatible - github.com/elazarl/go-bindata-assetfs v1.0.0 - github.com/gammazero/workerpool v0.0.0-20200206003619-019d125201ab + github.com/dgraph-io/badger/v2 v2.2007.4 + github.com/docker/docker v25.0.3+incompatible + github.com/elazarl/go-bindata-assetfs v1.0.1 + github.com/gammazero/workerpool v1.1.3 github.com/getlantern/deepcopy v0.0.0-20160317154340-7f45deb8130a github.com/ghodss/yaml v1.0.0 github.com/gizak/termui v2.3.0+incompatible github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 - github.com/go-test/deep v1.0.5 - github.com/golang/gddo v0.0.0-20200219175727-df439dd5819e - github.com/golang/protobuf v1.5.3 - github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/imdario/mergo v0.3.8 - github.com/jlaffaye/ftp v0.0.0-20191218041957-e1b8fdd0dcc3 + github.com/go-test/deep v1.1.0 + github.com/golang/gddo v0.0.0-20210115222349-20d68f94ee1f + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 + github.com/imdario/mergo v0.3.6 + github.com/jlaffaye/ftp v0.2.0 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/kr/pretty v0.3.1 - github.com/lestrrat-go/jwx/v2 v2.0.19 - github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 + github.com/lestrrat-go/jwx/v2 v2.0.20 + github.com/logrusorgru/aurora v2.0.3+incompatible github.com/minio/minio-go v6.0.14+incompatible - github.com/ncw/swift v1.0.50 + github.com/ncw/swift v1.0.53 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d - github.com/prometheus/client_golang v1.4.1 - github.com/prometheus/common v0.9.1 - github.com/rs/xid v1.2.1 - github.com/shirou/gopsutil v2.20.1+incompatible - github.com/sirupsen/logrus v1.5.0 - github.com/spf13/cobra v0.0.5 + github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/common v0.49.0 + github.com/rs/xid v1.5.0 + github.com/shirou/gopsutil/v3 v3.24.2 + github.com/sirupsen/logrus v1.9.3 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.17.0 - golang.org/x/net v0.19.0 - golang.org/x/oauth2 v0.10.0 - golang.org/x/time v0.3.0 - google.golang.org/api v0.126.0 - google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc - google.golang.org/grpc v1.56.3 - gopkg.in/olivere/elastic.v5 v5.0.84 + github.com/stretchr/testify v1.9.0 + golang.org/x/net v0.21.0 + golang.org/x/oauth2 v0.17.0 + golang.org/x/term v0.17.0 + golang.org/x/time v0.5.0 + google.golang.org/api v0.167.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240228224816-df926f6c8641 + google.golang.org/grpc v1.62.0 + google.golang.org/protobuf v1.32.0 + gopkg.in/olivere/elastic.v5 v5.0.86 k8s.io/api v0.29.2 k8s.io/apimachinery v0.29.2 k8s.io/client-go v0.29.2 ) require ( - cloud.google.com/go v0.110.2 // indirect - cloud.google.com/go/compute v1.20.1 // indirect + cloud.google.com/go v0.112.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.13.0 // indirect - github.com/DataDog/zstd v1.4.1 // indirect + cloud.google.com/go/iam v1.1.6 // indirect github.com/Microsoft/go-winio v0.4.14 // indirect - github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cpuguy83/go-md2man v1.0.10 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/dgraph-io/ristretto v0.0.0-20191025175511-c1f00be0418e // indirect + github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/eapache/go-resiliency v1.2.0 // indirect - github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect + github.com/eapache/go-resiliency v1.6.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/gammazero/deque v0.0.0-20190521012701-46e4ffb7a622 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/gammazero/deque v0.2.0 // indirect github.com/go-ini/ini v1.52.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect - github.com/go-ole/go-ole v1.2.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/s2a-go v0.1.4 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.11.0 // indirect - github.com/hashicorp/go-uuid v1.0.2 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/jcmturner/gofork v1.0.0 // indirect - github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.1 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.9.8 // indirect - github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/kr/text v0.2.0 // indirect github.com/lestrrat-go/blackmagic v1.0.2 // indirect github.com/lestrrat-go/httpcc v1.0.1 // indirect github.com/lestrrat-go/httprc v1.0.4 // indirect github.com/lestrrat-go/iter v1.0.2 // indirect github.com/lestrrat-go/option v1.0.1 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/maruel/panicparse v1.3.0 // indirect + github.com/maruel/panicparse v1.6.2 // indirect github.com/mattn/go-runewidth v0.0.8 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-wordwrap v1.0.0 // indirect github.com/moby/term v0.5.0 // indirect @@ -123,36 +129,42 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nsf/termbox-go v0.0.0-20200204031403-4d2b513ad8be // indirect - github.com/opencontainers/go-digest v1.0.0-rc1 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/pierrec/lz4 v2.4.1+incompatible // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/procfs v0.0.8 // indirect - github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/russross/blackfriday v1.5.2 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/sergi/go-diff v1.1.0 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/smartystreets/goconvey v1.6.4 // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240228201840-1f18d85a4ec2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.51.0 // indirect - gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect - gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect - gopkg.in/jcmturner/gokrb5.v7 v7.5.0 // indirect - gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/go.sum b/go.sum index b2e688ee..c9e4ac76 100644 --- a/go.sum +++ b/go.sum @@ -1,51 +1,39 @@ cloud.google.com/go v0.16.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.110.2 h1:sdFPBr6xG9/wkBbfhmUz/JmZC7X6LavQgcrVINrKiVA= -cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= -cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/datastore v1.11.0 h1:iF6I/HaLs3Ado8uRKMvZRvF/ZLkWaWE9i8AiHzbC774= -cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/kms v1.10.1 h1:7hm1bRqGCA1GBRQUrp831TwJ9TWhP+tvLuP497CQS2g= -cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= -cloud.google.com/go/pubsub v1.30.0 h1:vCge8m7aUKBJYOgrZp7EsNDf6QMd2CAlXZqWTn3yq6s= -cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= +cloud.google.com/go/datastore v1.15.0 h1:0P9WcsQeTWjuD1H14JIY7XQscIPQ4Laje8ti96IC5vg= +cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= +cloud.google.com/go/kms v1.15.7 h1:7caV9K3yIxvlQPAcaFffhlT7d1qpxjB1wHBtjWa13SM= +cloud.google.com/go/kms v1.15.7/go.mod h1:ub54lbsa6tDkUwnu4W7Yt1aAIFLnspgh0kPGToDukeI= +cloud.google.com/go/pubsub v1.36.2 h1:nAUD4aiWHZFYyINhRag1qOnHUk0/7QiWEa04XWnqACA= +cloud.google.com/go/pubsub v1.36.2/go.mod h1:mHCFLNG8abCrPzhuOnpBcr9DUy+l3/LWWn0qoJdbh1w= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= -github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/IBM/sarama v1.43.0 h1:YFFDn8mMI2QL0wOrG0J2sFoVIAFl7hS9JQi2YZsXtJc= +github.com/IBM/sarama v1.43.0/go.mod h1:zlE6HEbC/SMQ9mhEYaF7nNLYOUyrs0obySKCckWP9BM= github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/sarama v1.26.1 h1:3jnfWKD7gVwbB1KSy/lE0szA9duPuSFLViK0o/d3DgA= -github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU= -github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= +github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aws/aws-sdk-go v1.13.54 h1:myPvM7uaugP6Lh/goyJ1RbJumcz0IgVdIOpMIznOtyI= -github.com/aws/aws-sdk-go v1.13.54/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/aws/aws-sdk-go v1.29.11/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= +github.com/aws/aws-sdk-go v1.50.30 h1:2OelKH1eayeaH7OuL1Y9Ombfw4HK+/k0fEnJNWjyLts= +github.com/aws/aws-sdk-go v1.50.30/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= @@ -53,73 +41,74 @@ github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx2 github.com/bradfitz/gomemcache v0.0.0-20170208213004-1952afaa557d/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/dgraph-io/badger/v2 v2.0.1 h1:+D6dhIqC6jIeCclnxMHqk4HPuXgrRN5UfBsLR4dNQ3A= -github.com/dgraph-io/badger/v2 v2.0.1/go.mod h1:YoRSIp1LmAJ7zH7tZwRvjNMUYLxB4wl3ebYkaIruZ04= -github.com/dgraph-io/ristretto v0.0.0-20191025175511-c1f00be0418e h1:aeUNgwup7PnDOBAD1BOKAqzb/W/NksOj6r3dwKKuqfg= -github.com/dgraph-io/ristretto v0.0.0-20191025175511-c1f00be0418e/go.mod h1:edzKIzGvqUCMzhTVWbiTSe75zD9Xxq0GtSBtFmaUTZs= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ= +github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= -github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/go-resiliency v1.6.0 h1:CqGDTLtpwuWKn6Nj3uNUdflaq+/kIPsg0gfNzHton30= +github.com/eapache/go-resiliency v1.6.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= +github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= -github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/elazarl/go-bindata-assetfs v1.0.1 h1:m0kkaHRKEu7tUIUFVwhGGGYClXvyl4RE03qmvRTNfbw= +github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk= -github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsnotify/fsnotify v1.4.3-0.20170329110642-4da3e2cfbabc/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gammazero/deque v0.0.0-20190521012701-46e4ffb7a622 h1:lxbhOGZ9pU3Kf8P6lFluUcE82yVZn2EqEf4+mWRNPV0= -github.com/gammazero/deque v0.0.0-20190521012701-46e4ffb7a622/go.mod h1:D90+MBHVc9Sk1lJAbEVgws0eYEurY4mv2TDso3Nxh3w= -github.com/gammazero/workerpool v0.0.0-20200206003619-019d125201ab h1:BLCWHqLiTSzLZriw46b3HJLswyqY0E6B9y9tk4+7eFI= -github.com/gammazero/workerpool v0.0.0-20200206003619-019d125201ab/go.mod h1:ZObaTlXZGgqKXhhlk+zNvSOXT+h6VGThA0ZQxLqn8x0= +github.com/gammazero/deque v0.2.0 h1:SkieyNB4bg2/uZZLxvya0Pq6diUlwx7m2TeT7GAIWaA= +github.com/gammazero/deque v0.2.0/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU= +github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44HWy9Q= +github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= github.com/garyburd/redigo v1.1.1-0.20170914051019-70e1b1943d4f/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getlantern/deepcopy v0.0.0-20160317154340-7f45deb8130a h1:yU/FENpkHYISWsQrbr3pcZOBj0EuRjPzNc1+dTCLu44= github.com/getlantern/deepcopy v0.0.0-20160317154340-7f45deb8130a/go.mod h1:AEugkNu3BjBxyz958nJ5holD9PRjta6iprcoUauDbU4= @@ -131,35 +120,37 @@ github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7a github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-ini/ini v1.52.0 h1:3UeUAveYUTCYV/G0jNDiIrrtIeAl1oAjshYyU2PaAlQ= github.com/go-ini/ini v1.52.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.6.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/go-test/deep v1.0.5 h1:AKODKU3pDH1RzZzm6YZu77YWtEAq6uh1rLIAQlay2qc= -github.com/go-test/deep v1.0.5/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= +github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= +github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/gddo v0.0.0-20200219175727-df439dd5819e h1:NsQfXZpFhWx7D7/Wo3dSB3/o3vGVhAB4dJmR3eXXpmM= -github.com/golang/gddo v0.0.0-20200219175727-df439dd5819e/go.mod h1:sam69Hju0uq+5uvLJUMDlsKlQ21Vrs1Kd/1YFPNYdOU= +github.com/golang/gddo v0.0.0-20210115222349-20d68f94ee1f h1:16RtHeWGkJMc80Etb8RPCcKevXGldr57+LOyZt8zOlg= +github.com/golang/gddo v0.0.0-20210115222349-20d68f94ee1f/go.mod h1:ijRvpgDJDI262hYq/IQVYgf8hd8IHUs93Ol0kvMBAx4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -175,14 +166,13 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= @@ -193,8 +183,10 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -203,57 +195,73 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/gax-go/v2 v2.12.1 h1:9F8GV9r9ztXyAi00gsMQHNoF51xPZm8uj1dpYt2ZETM= +github.com/googleapis/gax-go/v2 v2.12.1/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gregjones/httpcache v0.0.0-20170920190843-316c5e0ff04e/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 h1:0IKlLyQ3Hs9nDaiK5cSHAGmcQEIC8l2Ts1u6x5Dfrqg= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/hcl v0.0.0-20170914154624-68e816d1c783/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/log15 v0.0.0-20170622235902-74a0988b5f80/go.mod h1:cOaXtrgN4ScfRrD9Bre7U1thNq5RtJ8ZoP4iXVGRj6o= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= -github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= -github.com/jlaffaye/ftp v0.0.0-20191218041957-e1b8fdd0dcc3 h1:QyB6CQGLB65Al72mAIbqrkGRk56JdGMHgBziM3F0FCw= -github.com/jlaffaye/ftp v0.0.0-20191218041957-e1b8fdd0dcc3/go.mod h1:PwUeyujmhaGohgOf0kJKxPfk3HcRv8QD/wAUN44go4k= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jlaffaye/ftp v0.2.0 h1:lXNvW7cBu7R/68bknOX3MrRIIqZ61zELs1P2RAiA3lg= +github.com/jlaffaye/ftp v0.2.0/go.mod h1:is2Ds5qkhceAPy2xD6RLI6hmp/qysSoymZ+Z2uTnspI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.9.8 h1:VMAMUUOh+gaxKTMk+zqbjsSjsIcUcL/LF4o63i82QyA= -github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -271,29 +279,29 @@ github.com/lestrrat-go/httprc v1.0.4 h1:bAZymwoZQb+Oq8MEbyipag7iSq6YIga8Wj6GOiJG github.com/lestrrat-go/httprc v1.0.4/go.mod h1:mwwz3JMTPBjHUkkDv/IGJ39aALInZLrhBp0X7KGUZlo= github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI= github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4= -github.com/lestrrat-go/jwx/v2 v2.0.19 h1:ekv1qEZE6BVct89QA+pRF6+4pCpfVrOnEJnTnT4RXoY= -github.com/lestrrat-go/jwx/v2 v2.0.19/go.mod h1:l3im3coce1lL2cDeAjqmaR+Awx+X8Ih+2k8BuHNJ4CU= +github.com/lestrrat-go/jwx/v2 v2.0.20 h1:sAgXuWS/t8ykxS9Bi2Qtn5Qhpakw1wrcjxChudjolCc= +github.com/lestrrat-go/jwx/v2 v2.0.20/go.mod h1:UlCSmKqw+agm5BsOBfEAbTvKsEApaGNqHAEUTv5PJC4= github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= -github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 h1:bqDmpDG49ZRnB5PcgP0RXtQvnMSgIF14M7CBd2shtXs= -github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= +github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.7.4-0.20170902060319-8d7837e64d3c/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/maruel/panicparse v1.3.0 h1:1Ep/RaYoSL1r5rTILHQQbyzHG8T4UP5ZbQTYTo4bdDc= -github.com/maruel/panicparse v1.3.0/go.mod h1:vszMjr5QQ4F5FSRfraldcIA/BCw5xrdLL+zEcU2nRBs= +github.com/maruel/panicparse v1.6.2 h1:tZuGQTlbOY5jCprrWMJTikREqKPn+UAKdR4CHSpj834= +github.com/maruel/panicparse v1.6.2/go.mod h1:uoxI4w9gJL6XahaYPMq/z9uadrdr1SyHuQwV2q80Mm0= +github.com/maruel/panicparse/v2 v2.1.1/go.mod h1:AeTWdCE4lcq8OKsLb6cHSj1RWHVSnV9HBCk7sKLF4Jg= github.com/mattn/go-colorable v0.0.10-0.20170816031813-ad5389df28cd/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.2/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.8 h1:3tS41NlGYSmhhe/8fhGRzc+z3AYCw1Fe1WAyLuujKs0= github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/minio/minio-go v6.0.14+incompatible h1:fnV+GD28LeqdN6vT2XdGKW8Qe/IfjJDswNVuni6km9o= github.com/minio/minio-go v6.0.14+incompatible/go.mod h1:7guKYtitv8dktvNUGrhzmNlA5wrAABTQXCoesZdFQO8= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -307,83 +315,80 @@ github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/ncw/swift v1.0.50 h1:E01b5bVIssNhx2KnzAjMWEXkKrb8ytTqCDWY7lqmWjA= -github.com/ncw/swift v1.0.50/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= +github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/nsf/termbox-go v0.0.0-20200204031403-4d2b513ad8be h1:yzmWtPyxEUIKdZg4RcPq64MfS8NA6A5fNOJgYhpR9EQ= github.com/nsf/termbox-go v0.0.0-20200204031403-4d2b513ad8be/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= +github.com/olivere/elastic/v7 v7.0.12/go.mod h1:14rWX28Pnh3qCKYRVnSGXWLf9MbLonYS/4FDCY3LAPo= github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= -github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pelletier/go-toml v1.0.1-0.20170904195809-1d6b12b7cb29/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pierrec/lz4 v2.4.1+incompatible h1:mFe7ttWaflA46Mhqh+jUfjp2qTbPYxLB2/OyBppH9dg= -github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.1 h1:FFSuS004yOQEtDdTq+TAOLP5xUq63KqAFYyOi8zA+Y8= -github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 h1:dY6ETXrvDG7Sa4vE8ZQG4yqWg6UnOcbqTAahkV813vQ= -github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shirou/gopsutil v2.20.1+incompatible h1:oIq9Cq4i84Hk8uQAUOG3eNdI/29hBawGrD5YRl6JRDY= -github.com/shirou/gopsutil v2.20.1+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/shirou/gopsutil/v3 v3.24.2 h1:kcR0erMbLg5/3LcInpw0X/rrPSqq4CDPyI6A6ZRC18Y= +github.com/shirou/gopsutil/v3 v3.24.2/go.mod h1:tSg/594BcA+8UdQU2XcW803GWYgdtauFFPgJCJKZlVk= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.5.0 h1:1N5EYkVAPEywqZRJd7cwnRtCb6xJx7NH3T3WUTF980Q= -github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= +github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/gunit v1.1.3/go.mod h1:EH5qMBab2UclzXUcpR8b93eHsIlp9u+pDQIRp5DZNzQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -391,8 +396,9 @@ github.com/spf13/afero v0.0.0-20170901052352-ee1bd8ee15a1/go.mod h1:j4pytiNVoe2o github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.1.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v0.0.0-20170901151539-12bd96e66386/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1-0.20170901120850-7aff26db30c1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -404,126 +410,157 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.einride.tech/aip v0.66.0 h1:XfV+NQX6L7EOYK11yoHHFtndeaWh3KbD9/cN/6iWEt8= +go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 h1:P+/g8GpuJGYbOp2tAdKrIPUX9JO02q8Q0YNlHolpibA= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 h1:doUP+ExOpH3spVTLS0FcWGLnQrPct/hD/bCPbDRUEAU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20170912212905-13449ad91cb2/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20170517211232-f52d1811a629/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20170424234030-8be79e1e0910/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -534,38 +571,36 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.0.0-20170921000349-586095a6e407/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.167.0 h1:CKHrQD1BLRii6xdkatBDXyKzM0mkawt2QP+H3LtPmSE= +google.golang.org/api v0.167.0/go.mod h1:4FcBc686KFi7QI/U51/2GKKevfZMpM17sCdibqe/bSA= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20170918111702-1e559d0a00ee/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20240228224816-df926f6c8641 h1:SO1wX9btGFrwj9EzH3ocqfwiPVOxfv4ggAJajzlHA5s= +google.golang.org/genproto/googleapis/api v0.0.0-20240228224816-df926f6c8641/go.mod h1:wLupoVsUfYPgOMwjzhYFbaVklw/INms+dqTp0tc1fv8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240228201840-1f18d85a4ec2 h1:tq9lBHtxIekiS924gvyj9nEwSKrkvcpIKLl2zA46pyk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240228201840-1f18d85a4ec2/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs= google.golang.org/grpc v1.2.1-0.20170921194603-d4b75ebd4f9f/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= -google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -577,10 +612,10 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -588,27 +623,15 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= -gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= -gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= -gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= -gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI= -gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= -gopkg.in/jcmturner/gokrb5.v7 v7.5.0 h1:a9tsXlIDD9SKxotJMK3niV7rPZAJeX2aD/0yg3qlIrg= -gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= -gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= -gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= -gopkg.in/olivere/elastic.v5 v5.0.84 h1:acF/tRSg5geZpE3rqLglkS79CQMIMzOpWZE7hRXIkjs= -gopkg.in/olivere/elastic.v5 v5.0.84/go.mod h1:LXF6q9XNBxpMqrcgax95C6xyARXWbbCXUrtTxrNrxJI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/olivere/elastic.v5 v5.0.86 h1:xFy6qRCGAmo5Wjx96srho9BitLhZl2fcnpuidPwduXM= +gopkg.in/olivere/elastic.v5 v5.0.86/go.mod h1:M3WNlsF+WhYn7api4D87NIflwTV/c0iVs8cqfWhK+68= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= diff --git a/logger/log.go b/logger/log.go index 361ce894..9b2a6a87 100644 --- a/logger/log.go +++ b/logger/log.go @@ -4,7 +4,6 @@ package logger import ( "fmt" "io" - "io/ioutil" "os" "runtime" "strings" @@ -74,13 +73,14 @@ func (l *Logger) SetOutput(o io.Writer) { // Discard configures the logger to discard all logs. func (l *Logger) Discard() { - l.SetOutput(ioutil.Discard) + l.SetOutput(io.Discard) } // Debug logs a debug message. // // After the first argument, arguments are key-value pairs which are written as structured logs. -// log.Debug("Some message here", "key1", value1, "key2", value2) +// +// log.Debug("Some message here", "key1", value1, "key2", value2) func (l *Logger) Debug(msg string, args ...interface{}) { if l == nil { return @@ -93,7 +93,8 @@ func (l *Logger) Debug(msg string, args ...interface{}) { // Info logs an info message // // After the first argument, arguments are key-value pairs which are written as structured logs. -// log.Info("Some message here", "key1", value1, "key2", value2) +// +// log.Info("Some message here", "key1", value1, "key2", value2) func (l *Logger) Info(msg string, args ...interface{}) { if l == nil { return @@ -106,11 +107,13 @@ func (l *Logger) Info(msg string, args ...interface{}) { // Error logs an error message // // After the first argument, arguments are key-value pairs which are written as structured logs. -// log.Error("Some message here", "key1", value1, "key2", value2) +// +// log.Error("Some message here", "key1", value1, "key2", value2) // // Error has a two-argument version that can be used as a shortcut. -// err := startServer() -// log.Error("Couldn't start server", err) +// +// err := startServer() +// log.Error("Couldn't start server", err) func (l *Logger) Error(msg string, args ...interface{}) { if l == nil { return @@ -136,7 +139,8 @@ func (l *Logger) Error(msg string, args ...interface{}) { // Warn logs an warning message // // After the first argument, arguments are key-value pairs which are written as structured logs. -// log.Info("Some message here", "key1", value1, "key2", value2) +// +// log.Info("Some message here", "key1", value1, "key2", value2) func (l *Logger) Warn(msg string, args ...interface{}) { if l == nil { return diff --git a/logger/text_formatter.go b/logger/text_formatter.go index 5ccb2732..a6a7ed3e 100644 --- a/logger/text_formatter.go +++ b/logger/text_formatter.go @@ -11,17 +11,18 @@ import ( "strings" "time" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" "github.com/kr/pretty" "github.com/logrusorgru/aurora" "github.com/sirupsen/logrus" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/reflect/protoreflect" ) var baseTimestamp = time.Now() -var jsonmar = jsonpb.Marshaler{ - Indent: " ", +var jsonmar = protojson.MarshalOptions{ + Indent: " ", + Multiline: false, } type textFormatter struct { @@ -32,7 +33,7 @@ type textFormatter struct { func checkIfTerminal(w io.Writer) bool { switch v := w.(type) { case *os.File: - return terminal.IsTerminal(int(v.Fd())) + return term.IsTerminal(int(v.Fd())) default: return false } @@ -72,7 +73,7 @@ func (f *textFormatter) Format(entry *logrus.Entry) ([]byte, error) { case logrus.DebugLevel: levelColor = aurora.MagentaFg case logrus.WarnLevel: - levelColor = aurora.BrownFg + levelColor = aurora.YellowFg case logrus.ErrorLevel, logrus.FatalLevel, logrus.PanicLevel: levelColor = aurora.RedFg default: @@ -101,11 +102,11 @@ func (f *textFormatter) Format(entry *logrus.Entry) ([]byte, error) { case float32: case float64: case bool: - case proto.Message: + case protoreflect.ProtoMessage: if reflect.ValueOf(x).IsNil() { // do nothing - } else if s, err := jsonmar.MarshalToString(x); err == nil { - v = s + } else if b, err := jsonmar.Marshal(x); err == nil { + v = string(b) } else { v = pretty.Sprint(x) } diff --git a/logger/text_formatter_test.go b/logger/text_formatter_test.go index 95683771..bde0744a 100644 --- a/logger/text_formatter_test.go +++ b/logger/text_formatter_test.go @@ -25,5 +25,7 @@ func TestFormatNilProtoField(t *testing.T) { "ns": "TEST", "nil value": nt, }) - tf.Format(entry) + if _, err := tf.Format(entry); err != nil { + t.Error(err) + } } diff --git a/server/auth_oidc.go b/server/auth_oidc.go index cd12fd30..91b4d490 100644 --- a/server/auth_oidc.go +++ b/server/auth_oidc.go @@ -64,7 +64,11 @@ func (c *OidcConfig) initJwks() { // Define JWKS cache: c.jwks = *jwk.NewCache(ctx) - c.jwks.Register(jwksUrl, jwk.WithMinRefreshInterval(15*time.Minute)) + if err := c.jwks.Register(jwksUrl, jwk.WithMinRefreshInterval(15*time.Minute)); err != nil { + fmt.Printf("[ERROR] Failed to register JWKS (%s) of the OIDC service "+ + "(%s): %s\n", jwksUrl, c.local.ServiceConfigUrl, err) + os.Exit(1) + } // Init JWKS cache: ctx2, _ := context.WithTimeout(ctx, 10*time.Second) diff --git a/server/server.go b/server/server.go index 3640755d..65bedd60 100644 --- a/server/server.go +++ b/server/server.go @@ -2,12 +2,13 @@ package server import ( + "fmt" "net" "net/http" "github.com/golang/gddo/httputil" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/ohsu-comp-bio/funnel/compute/scheduler" "github.com/ohsu-comp-bio/funnel/config" "github.com/ohsu-comp-bio/funnel/events" @@ -17,6 +18,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "golang.org/x/net/context" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" ) // Server represents a Funnel server. The server handles @@ -76,14 +78,17 @@ func (s *Server) Serve(pctx context.Context) error { ) dialOpts := []grpc.DialOption{ - grpc.WithInsecure(), + grpc.WithTransportCredentials(insecure.NewCredentials()), } // Set up HTTP proxy of gRPC API mux := http.NewServeMux() - mar := runtime.JSONPb(tes.Marshaler) + mar := runtime.JSONPb{ + MarshalOptions: tes.Marshaler, + UnmarshalOptions: tes.Unmarshaler, + } grpcMux := runtime.NewServeMux(runtime.WithMarshalerOption("*/*", &mar)) - runtime.OtherErrorHandler = s.handleError + runtime.WithErrorHandler(s.handleError) dashmux := http.NewServeMux() dashmux.Handle("/", webdash.RootHandler()) @@ -164,16 +169,25 @@ func (s *Server) Serve(pctx context.Context) error { <-ctx.Done() grpcServer.GracefulStop() - httpServer.Shutdown(context.TODO()) + if err := httpServer.Shutdown(context.TODO()); err != nil { + fmt.Printf("Detected error while shutting down HTTP server: %s\n", err) + } return srverr } // handleError handles errors in the HTTP stack, logging errors, stack traces, // and returning an HTTP error code. -func (s *Server) handleError(w http.ResponseWriter, req *http.Request, err string, code int) { +func (s *Server) handleError( + c context.Context, + mux *runtime.ServeMux, + m runtime.Marshaler, + w http.ResponseWriter, + req *http.Request, + err error, +) { s.Log.Error("HTTP handler error", "error", err, "url", req.URL) - http.Error(w, err, code) + http.Error(w, err.Error(), 500) } // negotiate determines the response type based on request headers and parameters. diff --git a/server/tes.go b/server/tes.go index 63b4aa5f..5cc1e370 100644 --- a/server/tes.go +++ b/server/tes.go @@ -9,8 +9,8 @@ import ( "github.com/ohsu-comp-bio/funnel/tes" "github.com/ohsu-comp-bio/funnel/version" "golang.org/x/net/context" - "google.golang.org/grpc" "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) // TaskService is a wrapper which handles common TES Task Service operations, @@ -35,7 +35,7 @@ type TaskService struct { func (ts *TaskService) CreateTask(ctx context.Context, task *tes.Task) (*tes.CreateTaskResponse, error) { if err := tes.InitTask(task, true); err != nil { - return nil, grpc.Errorf(codes.InvalidArgument, err.Error()) + return nil, status.Errorf(codes.InvalidArgument, err.Error()) } if err := ts.Event.WriteEvent(ctx, events.NewTaskCreated(task)); err != nil { @@ -58,7 +58,7 @@ func (ts *TaskService) CreateTask(ctx context.Context, task *tes.Task) (*tes.Cre func (ts *TaskService) GetTask(ctx context.Context, req *tes.GetTaskRequest) (*tes.Task, error) { task, err := ts.Read.GetTask(ctx, req) if err == tes.ErrNotFound { - err = grpc.Errorf(codes.NotFound, fmt.Sprintf("%v: taskID: %s", err.Error(), req.Id)) + err = status.Errorf(codes.NotFound, fmt.Sprintf("%v: taskID: %s", err.Error(), req.Id)) } return task, err } @@ -79,7 +79,7 @@ func (ts *TaskService) CancelTask(ctx context.Context, req *tes.CancelTaskReques // updated database and other event streams err = ts.Event.WriteEvent(ctx, events.NewState(req.Id, tes.Canceled)) if err == tes.ErrNotFound { - err = grpc.Errorf(codes.NotFound, fmt.Sprintf("%v: taskID: %s", err.Error(), req.Id)) + err = status.Errorf(codes.NotFound, fmt.Sprintf("%v: taskID: %s", err.Error(), req.Id)) } return &tes.CancelTaskResponse{}, err } diff --git a/storage/amazon_s3.go b/storage/amazon_s3.go index 607aee3a..b669b408 100644 --- a/storage/amazon_s3.go +++ b/storage/amazon_s3.go @@ -5,7 +5,6 @@ import ( "crypto/md5" "encoding/base64" "fmt" - "io/ioutil" "os" "regexp" "strings" @@ -58,7 +57,7 @@ func NewAmazonS3(conf config.AmazonS3Storage) (*AmazonS3, error) { } if conf.SSE.CustomerKeyFile != "" { - key, err := ioutil.ReadFile(conf.SSE.CustomerKeyFile) + key, err := os.ReadFile(conf.SSE.CustomerKeyFile) if err != nil { return nil, fmt.Errorf("error reading sse-c file: %v", err) } @@ -280,7 +279,7 @@ func (s3b *AmazonS3) parse(rawurl string) (*urlparts, string, error) { if s3b.endpoint != "" { path = strings.TrimPrefix(path, s3b.endpoint) } else { - re := regexp.MustCompile("^s3.*\\.amazonaws\\.com/") + re := regexp.MustCompile(`^s3.*\.amazonaws\.com/`) path = re.ReplaceAllString(path, "") } if path == "" { diff --git a/storage/anonymous_get_test.go b/storage/anonymous_get_test.go index debe5a36..9ef4fd6e 100644 --- a/storage/anonymous_get_test.go +++ b/storage/anonymous_get_test.go @@ -2,13 +2,13 @@ package storage import ( "context" - "net/http" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/ohsu-comp-bio/funnel/config" + "google.golang.org/api/option" "google.golang.org/api/storage/v1" ) @@ -47,7 +47,7 @@ func TestAmazonS3AnonymousGet(t *testing.T) { } func TestGoogleStorageAnonymousGet(t *testing.T) { - svc, err := storage.New(&http.Client{}) + svc, err := storage.NewService(context.Background(), option.WithoutAuthentication()) if err != nil { t.Fatal("Error creating GS backend:", err) } diff --git a/storage/ftp.go b/storage/ftp.go index e847b35b..6c44e7d3 100644 --- a/storage/ftp.go +++ b/storage/ftp.go @@ -135,8 +135,12 @@ func connect(url string, conf config.FTPStorage) (*ftpclient, error) { } func (b *ftpclient) Close() { - b.client.Logout() - b.client.Quit() + if err := b.client.Logout(); err != nil { + fmt.Printf("Detected error while sending FTP log-out: %s\n", err) + } + if err := b.client.Quit(); err != nil { + fmt.Printf("Detected error while sending FTP quit: %s\n", err) + } } // Stat returns information about the object at the given storage URL. diff --git a/storage/google_cloud.go b/storage/google_cloud.go index 7425a286..23d87b42 100644 --- a/storage/google_cloud.go +++ b/storage/google_cloud.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "io" - "io/ioutil" "net/http" "os" "strings" @@ -13,6 +12,7 @@ import ( "github.com/ohsu-comp-bio/funnel/config" "github.com/ohsu-comp-bio/funnel/util/fsutil" "golang.org/x/oauth2/google" + "google.golang.org/api/option" "google.golang.org/api/storage/v1" ) @@ -33,7 +33,7 @@ func NewGoogleCloud(conf config.GoogleCloudStorage) (*GoogleCloud, error) { if conf.CredentialsFile != "" { // Pull the client configuration (e.g. auth) from a given account file. // This is likely downloaded from Google Cloud manually via IAM & Admin > Service accounts. - bytes, rerr := ioutil.ReadFile(conf.CredentialsFile) + bytes, rerr := os.ReadFile(conf.CredentialsFile) if rerr != nil { return nil, rerr } @@ -52,7 +52,7 @@ func NewGoogleCloud(conf config.GoogleCloudStorage) (*GoogleCloud, error) { } } - svc, cerr := storage.New(client) + svc, cerr := storage.NewService(ctx, option.WithHTTPClient(client)) if cerr != nil { return nil, cerr } diff --git a/storage/htsget.go b/storage/htsget.go index 0698ab5b..3222308e 100644 --- a/storage/htsget.go +++ b/storage/htsget.go @@ -4,9 +4,10 @@ import ( "bytes" "context" "fmt" - "strings" - "os/exec" "os" + "os/exec" + "strings" + "github.com/ohsu-comp-bio/funnel/config" ) @@ -22,21 +23,21 @@ func NewHTSGET(conf config.HTSGETStorage) (*HTSGET, error) { // Join a directory URL with a subpath. func (b *HTSGET) Join(url, path string) (string, error) { - return "", nil + return "", nil } // Stat returns information about the object at the given storage URL. func (b *HTSGET) Stat(ctx context.Context, url string) (*Object, error) { - return nil, nil + return nil, nil } // List a directory. Calling List on a File is an error. func (b *HTSGET) List(ctx context.Context, url string) ([]*Object, error) { - return nil, nil + return nil, nil } func (b *HTSGET) Put(ctx context.Context, url, path string) (*Object, error) { - return nil, nil + return nil, nil } // Get copies a file from a given URL to the host path. @@ -51,7 +52,7 @@ func (b *HTSGET) Get(ctx context.Context, url, path string) (*Object, error) { return nil, fmt.Errorf("Bearer token not terminated by @") } bearer := url[_bearer_start:_bearer_stop] - url = "htsget://"+url[_bearer_stop+1:] + url = "htsget://" + url[_bearer_stop+1:] cmd = exec.Command("htsget", "--bearer-token", bearer, strings.Replace(url, "htsget://", "https://", 1), "--output", path) } else { cmd = exec.Command("htsget", strings.Replace(url, "htsget://", "https://", 1), "--output", path) @@ -67,10 +68,10 @@ func (b *HTSGET) Get(ctx context.Context, url, path string) (*Object, error) { return nil, err } return &Object{ - URL: url, + URL: url, Size: info.Size(), LastModified: info.ModTime(), - Name: path, + Name: path, }, nil } @@ -82,27 +83,17 @@ func (b *HTSGET) UnsupportedOperations(url string) UnsupportedOperations { } ops := UnsupportedOperations{ - List: fmt.Errorf("htsgetStorage: List operation is not supported"), - Put: fmt.Errorf("htsgetStorage: Put operation is not supported"), + List: fmt.Errorf("htsgetStorage: List operation is not supported"), + Put: fmt.Errorf("htsgetStorage: Put operation is not supported"), Join: fmt.Errorf("htsgetStorage: Join operation is not supported"), Stat: fmt.Errorf("htsgetStorage: Stat operation is not supported"), - } + } return ops } func (b *HTSGET) supportsPrefix(url string) error { - if !strings.HasPrefix(url, "htsget://") { + if !strings.HasPrefix(url, "htsget://") { return &ErrUnsupportedProtocol{"htsgetStorage"} } return nil } - -// htsgetclient exists implements the storage API and reuses an HTSGET client -// for recursive calls. -type htsgetclient struct { -} - -// Get copies a file from a given URL to the host path. -func (b *htsgetclient) Get(ctx context.Context, url, path string) (*Object, error) { - return nil, nil -} diff --git a/storage/http.go b/storage/http.go index 20fe5bef..b7ba37be 100644 --- a/storage/http.go +++ b/storage/http.go @@ -34,11 +34,10 @@ func (b *HTTP) Stat(ctx context.Context, url string) (*Object, error) { return nil, fmt.Errorf("httpStorage: parsing URL: %s", err) } - req, err := http.NewRequest("HEAD", url, nil) + req, err := http.NewRequestWithContext(ctx, "HEAD", url, nil) if err != nil { return nil, fmt.Errorf("httpStorage: creating HEAD request: %s", err) } - req.WithContext(ctx) resp, err := b.client.Do(req) if err != nil { @@ -67,11 +66,10 @@ func (b *HTTP) Get(ctx context.Context, url, path string) (*Object, error) { return nil, fmt.Errorf("httpStorage: parsing URL: %s", err) } - req, err := http.NewRequest("GET", url, nil) + req, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { return nil, fmt.Errorf("httpStorage: creating GET request: %s", err) } - req.WithContext(ctx) resp, err := b.client.Do(req) if err != nil { diff --git a/storage/local_test.go b/storage/local_test.go index 587b6443..1808f7b1 100644 --- a/storage/local_test.go +++ b/storage/local_test.go @@ -2,7 +2,6 @@ package storage import ( "context" - "io/ioutil" "os" "path" "path/filepath" @@ -28,7 +27,7 @@ func TestLocalSupports(t *testing.T) { // Tests Get on a "file://" URL, e.g. "file:///path/to/foo.txt" func TestLocalGet(t *testing.T) { ctx := context.Background() - tmp, err := ioutil.TempDir("", "funnel-test-local-storage") + tmp, err := os.MkdirTemp("", "funnel-test-local-storage") if err != nil { t.Fatal(err) } @@ -37,14 +36,17 @@ func TestLocalGet(t *testing.T) { // File test ip := path.Join(tmp, "input.txt") cp := path.Join(tmp, "container.txt") - ioutil.WriteFile(ip, []byte("foo"), os.ModePerm) + err = os.WriteFile(ip, []byte("foo"), os.ModePerm) + if err != nil { + t.Fatal(err) + } _, gerr := l.Get(ctx, "file://"+ip, cp) if gerr != nil { t.Fatal(gerr) } - b, rerr := ioutil.ReadFile(cp) + b, rerr := os.ReadFile(cp) if rerr != nil { t.Fatal(rerr) } @@ -155,7 +157,7 @@ func TestLocalJoin(t *testing.T) { // Tests Get on a URL that is a path, e.g. "/path/to/foo.txt" func TestLocalGetPath(t *testing.T) { ctx := context.Background() - tmp, err := ioutil.TempDir("", "funnel-test-local-storage") + tmp, err := os.MkdirTemp("", "funnel-test-local-storage") if err != nil { t.Fatal(err) } @@ -163,14 +165,17 @@ func TestLocalGetPath(t *testing.T) { ip := path.Join(tmp, "input.txt") cp := path.Join(tmp, "container.txt") - ioutil.WriteFile(ip, []byte("foo"), os.ModePerm) + err = os.WriteFile(ip, []byte("foo"), os.ModePerm) + if err != nil { + t.Fatal(err) + } _, gerr := l.Get(ctx, ip, cp) if gerr != nil { t.Fatal(gerr) } - b, rerr := ioutil.ReadFile(cp) + b, rerr := os.ReadFile(cp) if rerr != nil { t.Fatal(rerr) } @@ -182,7 +187,7 @@ func TestLocalGetPath(t *testing.T) { // Tests Put on a "file://" URL, e.g. "file:///path/to/foo.txt" func TestLocalPut(t *testing.T) { ctx := context.Background() - tmp, err := ioutil.TempDir("", "funnel-test-local-storage") + tmp, err := os.MkdirTemp("", "funnel-test-local-storage") if err != nil { t.Fatal(err) } @@ -191,14 +196,17 @@ func TestLocalPut(t *testing.T) { // File test cp := path.Join(tmp, "container.txt") op := path.Join(tmp, "output.txt") - ioutil.WriteFile(cp, []byte("foo"), os.ModePerm) + err = os.WriteFile(cp, []byte("foo"), os.ModePerm) + if err != nil { + t.Fatal(err) + } _, gerr := l.Put(ctx, "file://"+op, cp) if gerr != nil { t.Fatal(gerr) } - b, rerr := ioutil.ReadFile(op) + b, rerr := os.ReadFile(op) if rerr != nil { t.Fatal(rerr) } @@ -210,7 +218,7 @@ func TestLocalPut(t *testing.T) { // Tests Put on a URL that is a path, e.g. "/path/to/foo.txt" func TestLocalPutPath(t *testing.T) { ctx := context.Background() - tmp, err := ioutil.TempDir("", "funnel-test-local-storage") + tmp, err := os.MkdirTemp("", "funnel-test-local-storage") if err != nil { t.Fatal(err) } @@ -218,14 +226,17 @@ func TestLocalPutPath(t *testing.T) { cp := path.Join(tmp, "container.txt") op := path.Join(tmp, "output.txt") - ioutil.WriteFile(cp, []byte("foo"), os.ModePerm) + err = os.WriteFile(cp, []byte("foo"), os.ModePerm) + if err != nil { + t.Fatal(err) + } _, gerr := l.Put(ctx, op, cp) if gerr != nil { t.Fatal(gerr) } - b, rerr := ioutil.ReadFile(op) + b, rerr := os.ReadFile(op) if rerr != nil { t.Fatal(rerr) } @@ -239,11 +250,11 @@ func TestLocalPutPath(t *testing.T) { // against the case where the same path is 'Put' twice func TestSameFile(t *testing.T) { ctx := context.Background() - tmp, err := ioutil.TempDir("", "funnel-test-local-storage") + tmp, err := os.MkdirTemp("", "funnel-test-local-storage") if err != nil { t.Fatal(err) } - tmpOut, err := ioutil.TempDir("", "funnel-test-local-storage") + tmpOut, err := os.MkdirTemp("", "funnel-test-local-storage") if err != nil { t.Fatal(err) } @@ -252,8 +263,16 @@ func TestSameFile(t *testing.T) { cp := path.Join(tmp, "output.txt") cp2 := path.Join(tmp, "output2.txt") op := path.Join(tmpOut, "output.txt") - ioutil.WriteFile(cp, []byte("foo"), os.ModePerm) - ioutil.WriteFile(cp2, []byte("bar"), os.ModePerm) + + err = os.WriteFile(cp, []byte("foo"), os.ModePerm) + if err != nil { + t.Fatal(err) + } + + err = os.WriteFile(cp2, []byte("bar"), os.ModePerm) + if err != nil { + t.Fatal(err) + } err = linkFile(ctx, cp, op) if err != nil { @@ -268,7 +287,7 @@ func TestSameFile(t *testing.T) { } // Check the resulting content - b, err := ioutil.ReadFile(op) + b, err := os.ReadFile(op) if err != nil { t.Fatal(err) } @@ -283,7 +302,7 @@ func TestSameFile(t *testing.T) { } // Check the resulting content - b, err = ioutil.ReadFile(op) + b, err = os.ReadFile(op) if err != nil { t.Fatal(err) } diff --git a/storage/storage_test.go b/storage/storage_test.go index 74f3b394..dda08636 100644 --- a/storage/storage_test.go +++ b/storage/storage_test.go @@ -1,7 +1,6 @@ package storage import ( - "io/ioutil" "os" "path" "testing" @@ -120,12 +119,12 @@ func TestUrlParsing(t *testing.T) { t.Error("wrong key") } - url, err = b.parse("gs://1000genomes/README.analysis_history") + _, err = b.parse("gs://1000genomes/README.analysis_history") if _, ok := err.(*ErrUnsupportedProtocol); !ok { t.Error("expected ErrUnsupportedProtocol") } - url, err = b.parse("s3://") + _, err = b.parse("s3://") if _, ok := err.(*ErrInvalidURL); !ok { t.Error("expected ErrInvalidURL") } @@ -181,12 +180,12 @@ func TestUrlParsing(t *testing.T) { t.Error("wrong key") } - url, _, err = ab.parse("gs://1000genomes/README.analysis_history") + _, _, err = ab.parse("gs://1000genomes/README.analysis_history") if _, ok := err.(*ErrUnsupportedProtocol); !ok { t.Error("expected ErrUnsupportedProtocol") } - url, _, err = ab.parse("s3://") + _, _, err = ab.parse("s3://") if _, ok := err.(*ErrInvalidURL); !ok { t.Error("expected ErrInvalidURL") } @@ -212,12 +211,12 @@ func TestUrlParsing(t *testing.T) { t.Error("wrong key") } - url, err = gb.parse("s3://1000genomes/README.analysis_history") + _, err = gb.parse("s3://1000genomes/README.analysis_history") if _, ok := err.(*ErrUnsupportedProtocol); !ok { t.Error("expected ErrUnsupportedProtocol") } - url, err = gb.parse("gs://") + _, err = gb.parse("gs://") if _, ok := err.(*ErrInvalidURL); !ok { t.Error("expected ErrInvalidURL") } @@ -240,19 +239,19 @@ func TestUrlParsing(t *testing.T) { t.Error("wrong key") } - url, err = sb.parse("s3://1000genomes/README.analysis_history") + _, err = sb.parse("s3://1000genomes/README.analysis_history") if _, ok := err.(*ErrUnsupportedProtocol); !ok { t.Error("expected ErrUnsupportedProtocol") } - url, err = sb.parse("swift://") + _, err = sb.parse("swift://") if _, ok := err.(*ErrInvalidURL); !ok { t.Error("expected ErrInvalidURL") } } func TestWalkFiles(t *testing.T) { - tmp, err := ioutil.TempDir("", "funnel-test-local-storage") + tmp, err := os.MkdirTemp("", "funnel-test-local-storage") if err != nil { t.Fatal(err) } diff --git a/tes/client.go b/tes/client.go index 501d8761..7c76af70 100644 --- a/tes/client.go +++ b/tes/client.go @@ -11,9 +11,9 @@ import ( "strings" "time" - "github.com/golang/protobuf/jsonpb" "github.com/ohsu-comp-bio/funnel/util" "golang.org/x/net/context" + "google.golang.org/protobuf/encoding/protojson" ) // NewClient returns a new HTTP client for accessing @@ -52,7 +52,7 @@ func NewClient(address string) (*Client, error) { type Client struct { address string client *http.Client - Marshaler *jsonpb.Marshaler + Marshaler *protojson.MarshalOptions User string Password string Bearer string @@ -70,8 +70,7 @@ func (c *Client) setAuth(hreq *http.Request) { func (c *Client) GetTask(ctx context.Context, req *GetTaskRequest) (*Task, error) { // Send request u := c.address + "/v1/tasks/" + req.Id + "?view=" + req.View.String() - hreq, _ := http.NewRequest("GET", u, nil) - hreq.WithContext(ctx) + hreq, _ := http.NewRequestWithContext(ctx, "GET", u, nil) c.setAuth(hreq) body, err := util.CheckHTTPResponse(c.client.Do(hreq)) if err != nil { @@ -79,7 +78,7 @@ func (c *Client) GetTask(ctx context.Context, req *GetTaskRequest) (*Task, error } // Parse response resp := &Task{} - err = jsonpb.UnmarshalString(string(body), resp) + err = Unmarshaler.Unmarshal(body, resp) if err != nil { return nil, err } @@ -104,8 +103,7 @@ func (c *Client) ListTasks(ctx context.Context, req *ListTasksRequest) (*ListTas // Send request u := c.address + "/v1/tasks?" + v.Encode() - hreq, _ := http.NewRequest("GET", u, nil) - hreq.WithContext(ctx) + hreq, _ := http.NewRequestWithContext(ctx, "GET", u, nil) c.setAuth(hreq) body, err := util.CheckHTTPResponse(c.client.Do(hreq)) if err != nil { @@ -113,7 +111,7 @@ func (c *Client) ListTasks(ctx context.Context, req *ListTasksRequest) (*ListTas } // Parse response resp := &ListTasksResponse{} - err = jsonpb.UnmarshalString(string(body), resp) + err = Unmarshaler.Unmarshal(body, resp) if err != nil { return nil, err } @@ -127,16 +125,14 @@ func (c *Client) CreateTask(ctx context.Context, task *Task) (*CreateTaskRespons return nil, fmt.Errorf("invalid task message: %v", verr) } - var b bytes.Buffer - err := Marshaler.Marshal(&b, task) + b, err := Marshaler.Marshal(task) if err != nil { return nil, fmt.Errorf("error marshaling task message: %v", err) } // Send request u := c.address + "/v1/tasks" - hreq, _ := http.NewRequest("POST", u, &b) - hreq.WithContext(ctx) + hreq, _ := http.NewRequestWithContext(ctx, "POST", u, bytes.NewBuffer(b)) hreq.Header.Add("Content-Type", "application/json") c.setAuth(hreq) body, err := util.CheckHTTPResponse(c.client.Do(hreq)) @@ -146,7 +142,7 @@ func (c *Client) CreateTask(ctx context.Context, task *Task) (*CreateTaskRespons // Parse response resp := &CreateTaskResponse{} - err = jsonpb.UnmarshalString(string(body), resp) + err = Unmarshaler.Unmarshal(body, resp) if err != nil { return nil, err } @@ -156,8 +152,7 @@ func (c *Client) CreateTask(ctx context.Context, task *Task) (*CreateTaskRespons // CancelTask POSTs to /v1/tasks/{id}:cancel func (c *Client) CancelTask(ctx context.Context, req *CancelTaskRequest) (*CancelTaskResponse, error) { u := c.address + "/v1/tasks/" + req.Id + ":cancel" - hreq, _ := http.NewRequest("POST", u, nil) - hreq.WithContext(ctx) + hreq, _ := http.NewRequestWithContext(ctx, "POST", u, nil) hreq.Header.Add("Content-Type", "application/json") c.setAuth(hreq) body, err := util.CheckHTTPResponse(c.client.Do(hreq)) @@ -167,7 +162,7 @@ func (c *Client) CancelTask(ctx context.Context, req *CancelTaskRequest) (*Cance // Parse response resp := &CancelTaskResponse{} - err = jsonpb.UnmarshalString(string(body), resp) + err = Unmarshaler.Unmarshal(body, resp) if err != nil { return nil, err } @@ -177,8 +172,7 @@ func (c *Client) CancelTask(ctx context.Context, req *CancelTaskRequest) (*Cance // GetServiceInfo returns result of GET /v1/tasks/service-info func (c *Client) GetServiceInfo(ctx context.Context, req *ServiceInfoRequest) (*ServiceInfo, error) { u := c.address + "/v1/tasks/service-info" - hreq, _ := http.NewRequest("GET", u, nil) - hreq.WithContext(ctx) + hreq, _ := http.NewRequestWithContext(ctx, "GET", u, nil) c.setAuth(hreq) body, err := util.CheckHTTPResponse(c.client.Do(hreq)) if err != nil { @@ -187,7 +181,7 @@ func (c *Client) GetServiceInfo(ctx context.Context, req *ServiceInfoRequest) (* // Parse response resp := &ServiceInfo{} - err = jsonpb.UnmarshalString(string(body), resp) + err = Unmarshaler.Unmarshal(body, resp) if err != nil { return nil, err } diff --git a/tes/client_test.go b/tes/client_test.go index 1f496e12..68a0aa4d 100644 --- a/tes/client_test.go +++ b/tes/client_test.go @@ -12,7 +12,7 @@ import ( func testServer(mux http.Handler) *httptest.Server { // Start test server - lis, err := net.Listen("tcp", ":20001") + lis, err := net.Listen("tcp", "localhost:20001") if err != nil { panic(err) } @@ -39,7 +39,11 @@ func TestGetTask(t *testing.T) { mux := http.NewServeMux() mux.HandleFunc("/v1/tasks/test-id", func(w http.ResponseWriter, r *http.Request) { ta := Task{Id: "test-id"} - Marshaler.Marshal(w, &ta) + if b, err := Marshaler.Marshal(&ta); err != nil { + t.Error(err) + } else if _, err2 := w.Write(b); err2 != nil { + t.Error("Failed to write response", err2) + } }) ts := testServer(mux) @@ -70,7 +74,11 @@ func TestGetTaskTrailingSlash(t *testing.T) { mux := http.NewServeMux() mux.HandleFunc("/v1/tasks/test-id", func(w http.ResponseWriter, r *http.Request) { ta := Task{Id: "test-id"} - Marshaler.Marshal(w, &ta) + if b, err := Marshaler.Marshal(&ta); err != nil { + t.Error(err) + } else if _, err2 := w.Write(b); err2 != nil { + t.Error("Failed to write response", err2) + } }) ts := testServer(mux) diff --git a/tes/tes.pb.go b/tes/tes.pb.go index b0419a8d..14a9b1ea 100644 --- a/tes/tes.pb.go +++ b/tes/tes.pb.go @@ -1,52 +1,25 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: tes.proto - -/* -Package tes is a generated protocol buffer package. - -It is generated from these files: - tes.proto - -It has these top-level messages: - Task - Input - Output - Executor - Resources - TaskLog - ExecutorLog - OutputFileLog - CreateTaskResponse - GetTaskRequest - ListTasksRequest - ListTasksResponse - CancelTaskRequest - CancelTaskResponse - ServiceInfoRequest - ServiceInfo -*/ -package tes +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.3 +// source: tes/tes.proto -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "google.golang.org/genproto/googleapis/api/annotations" +package tes import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type FileType int32 @@ -55,19 +28,44 @@ const ( FileType_DIRECTORY FileType = 1 ) -var FileType_name = map[int32]string{ - 0: "FILE", - 1: "DIRECTORY", -} -var FileType_value = map[string]int32{ - "FILE": 0, - "DIRECTORY": 1, +// Enum value maps for FileType. +var ( + FileType_name = map[int32]string{ + 0: "FILE", + 1: "DIRECTORY", + } + FileType_value = map[string]int32{ + "FILE": 0, + "DIRECTORY": 1, + } +) + +func (x FileType) Enum() *FileType { + p := new(FileType) + *p = x + return p } func (x FileType) String() string { - return proto.EnumName(FileType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FileType) Descriptor() protoreflect.EnumDescriptor { + return file_tes_tes_proto_enumTypes[0].Descriptor() +} + +func (FileType) Type() protoreflect.EnumType { + return &file_tes_tes_proto_enumTypes[0] +} + +func (x FileType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FileType.Descriptor instead. +func (FileType) EnumDescriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{0} } -func (FileType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } // OUTPUT ONLY // @@ -107,33 +105,58 @@ const ( State_CANCELED State = 8 ) -var State_name = map[int32]string{ - 0: "UNKNOWN", - 1: "QUEUED", - 2: "INITIALIZING", - 3: "RUNNING", - 4: "PAUSED", - 5: "COMPLETE", - 6: "EXECUTOR_ERROR", - 7: "SYSTEM_ERROR", - 8: "CANCELED", -} -var State_value = map[string]int32{ - "UNKNOWN": 0, - "QUEUED": 1, - "INITIALIZING": 2, - "RUNNING": 3, - "PAUSED": 4, - "COMPLETE": 5, - "EXECUTOR_ERROR": 6, - "SYSTEM_ERROR": 7, - "CANCELED": 8, +// Enum value maps for State. +var ( + State_name = map[int32]string{ + 0: "UNKNOWN", + 1: "QUEUED", + 2: "INITIALIZING", + 3: "RUNNING", + 4: "PAUSED", + 5: "COMPLETE", + 6: "EXECUTOR_ERROR", + 7: "SYSTEM_ERROR", + 8: "CANCELED", + } + State_value = map[string]int32{ + "UNKNOWN": 0, + "QUEUED": 1, + "INITIALIZING": 2, + "RUNNING": 3, + "PAUSED": 4, + "COMPLETE": 5, + "EXECUTOR_ERROR": 6, + "SYSTEM_ERROR": 7, + "CANCELED": 8, + } +) + +func (x State) Enum() *State { + p := new(State) + *p = x + return p } func (x State) String() string { - return proto.EnumName(State_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (State) Descriptor() protoreflect.EnumDescriptor { + return file_tes_tes_proto_enumTypes[1].Descriptor() +} + +func (State) Type() protoreflect.EnumType { + return &file_tes_tes_proto_enumTypes[1] +} + +func (x State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use State.Descriptor instead. +func (State) EnumDescriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{1} } -func (State) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } // TaskView affects the fields returned by the ListTasks endpoint. // @@ -145,66 +168,97 @@ type TaskView int32 const ( // Task message will include ONLY the fields: - // Task.Id - // Task.State + // + // Task.Id + // Task.State TaskView_MINIMAL TaskView = 0 // Task message will include all fields EXCEPT: - // Task.ExecutorLog.stdout - // Task.ExecutorLog.stderr - // Input.content - // TaskLog.system_logs + // + // Task.ExecutorLog.stdout + // Task.ExecutorLog.stderr + // Input.content + // TaskLog.system_logs TaskView_BASIC TaskView = 1 // Task message includes all fields. TaskView_FULL TaskView = 2 ) -var TaskView_name = map[int32]string{ - 0: "MINIMAL", - 1: "BASIC", - 2: "FULL", -} -var TaskView_value = map[string]int32{ - "MINIMAL": 0, - "BASIC": 1, - "FULL": 2, +// Enum value maps for TaskView. +var ( + TaskView_name = map[int32]string{ + 0: "MINIMAL", + 1: "BASIC", + 2: "FULL", + } + TaskView_value = map[string]int32{ + "MINIMAL": 0, + "BASIC": 1, + "FULL": 2, + } +) + +func (x TaskView) Enum() *TaskView { + p := new(TaskView) + *p = x + return p } func (x TaskView) String() string { - return proto.EnumName(TaskView_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TaskView) Descriptor() protoreflect.EnumDescriptor { + return file_tes_tes_proto_enumTypes[2].Descriptor() +} + +func (TaskView) Type() protoreflect.EnumType { + return &file_tes_tes_proto_enumTypes[2] +} + +func (x TaskView) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TaskView.Descriptor instead. +func (TaskView) EnumDescriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{2} } -func (TaskView) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } // Task describes an instance of a task. type Task struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // OUTPUT ONLY // // Task identifier assigned by the server. - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // OUTPUT ONLY - State State `protobuf:"varint,2,opt,name=state,enum=tes.State" json:"state,omitempty"` + State State `protobuf:"varint,2,opt,name=state,proto3,enum=tes.State" json:"state,omitempty"` // OPTIONAL - Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // OPTIONAL - Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // OPTIONAL // // Input files. // Inputs will be downloaded and mounted into the executor container. - Inputs []*Input `protobuf:"bytes,6,rep,name=inputs" json:"inputs,omitempty"` + Inputs []*Input `protobuf:"bytes,6,rep,name=inputs,proto3" json:"inputs,omitempty"` // OPTIONAL // // Output files. // Outputs will be uploaded from the executor container to long-term storage. - Outputs []*Output `protobuf:"bytes,7,rep,name=outputs" json:"outputs,omitempty"` + Outputs []*Output `protobuf:"bytes,7,rep,name=outputs,proto3" json:"outputs,omitempty"` // OPTIONAL // // Request that the task be run with these resources. - Resources *Resources `protobuf:"bytes,8,opt,name=resources" json:"resources,omitempty"` + Resources *Resources `protobuf:"bytes,8,opt,name=resources,proto3" json:"resources,omitempty"` // REQUIRED // // A list of executors to be run, sequentially. Execution stops // on the first error. - Executors []*Executor `protobuf:"bytes,9,rep,name=executors" json:"executors,omitempty"` + Executors []*Executor `protobuf:"bytes,9,rep,name=executors,proto3" json:"executors,omitempty"` // OPTIONAL // // Volumes are directories which may be used to share data between @@ -218,119 +272,150 @@ type Task struct { // // (Essentially, this translates to a `docker run -v` flag where // the container path is the same for each executor). - Volumes []string `protobuf:"bytes,10,rep,name=volumes" json:"volumes,omitempty"` + Volumes []string `protobuf:"bytes,10,rep,name=volumes,proto3" json:"volumes,omitempty"` // OPTIONAL // // A key-value map of arbitrary tags. - Tags map[string]string `protobuf:"bytes,11,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Tags map[string]string `protobuf:"bytes,11,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // OUTPUT ONLY // // Task logging information. // Normally, this will contain only one entry, but in the case where // a task fails and is retried, an entry will be appended to this list. - Logs []*TaskLog `protobuf:"bytes,12,rep,name=logs" json:"logs,omitempty"` + Logs []*TaskLog `protobuf:"bytes,12,rep,name=logs,proto3" json:"logs,omitempty"` // OUTPUT ONLY, REQUIRED // // Date + time the task was created, in RFC 3339 format. // This is set by the system, not the client. - CreationTime string `protobuf:"bytes,13,opt,name=creation_time,json=creationTime" json:"creation_time,omitempty"` + CreationTime string `protobuf:"bytes,13,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` +} + +func (x *Task) Reset() { + *x = Task{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Task) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Task) Reset() { *m = Task{} } -func (m *Task) String() string { return proto.CompactTextString(m) } -func (*Task) ProtoMessage() {} -func (*Task) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*Task) ProtoMessage() {} -func (m *Task) GetId() string { - if m != nil { - return m.Id +func (x *Task) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task.ProtoReflect.Descriptor instead. +func (*Task) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{0} +} + +func (x *Task) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *Task) GetState() State { - if m != nil { - return m.State +func (x *Task) GetState() State { + if x != nil { + return x.State } return State_UNKNOWN } -func (m *Task) GetName() string { - if m != nil { - return m.Name +func (x *Task) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Task) GetDescription() string { - if m != nil { - return m.Description +func (x *Task) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Task) GetInputs() []*Input { - if m != nil { - return m.Inputs +func (x *Task) GetInputs() []*Input { + if x != nil { + return x.Inputs } return nil } -func (m *Task) GetOutputs() []*Output { - if m != nil { - return m.Outputs +func (x *Task) GetOutputs() []*Output { + if x != nil { + return x.Outputs } return nil } -func (m *Task) GetResources() *Resources { - if m != nil { - return m.Resources +func (x *Task) GetResources() *Resources { + if x != nil { + return x.Resources } return nil } -func (m *Task) GetExecutors() []*Executor { - if m != nil { - return m.Executors +func (x *Task) GetExecutors() []*Executor { + if x != nil { + return x.Executors } return nil } -func (m *Task) GetVolumes() []string { - if m != nil { - return m.Volumes +func (x *Task) GetVolumes() []string { + if x != nil { + return x.Volumes } return nil } -func (m *Task) GetTags() map[string]string { - if m != nil { - return m.Tags +func (x *Task) GetTags() map[string]string { + if x != nil { + return x.Tags } return nil } -func (m *Task) GetLogs() []*TaskLog { - if m != nil { - return m.Logs +func (x *Task) GetLogs() []*TaskLog { + if x != nil { + return x.Logs } return nil } -func (m *Task) GetCreationTime() string { - if m != nil { - return m.CreationTime +func (x *Task) GetCreationTime() string { + if x != nil { + return x.CreationTime } return "" } // Input describes Task input files. type Input struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // OPTIONAL - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // OPTIONAL - Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // REQUIRED, unless "content" is set. // // URL in long term storage, for example: @@ -339,16 +424,16 @@ type Input struct { // file:///path/to/my/file // /path/to/my/file // etc... - Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` // REQUIRED // // Path of the file inside the container. // Must be an absolute path. - Path string `protobuf:"bytes,4,opt,name=path" json:"path,omitempty"` + Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` // REQUIRED // // Type of the file, FILE or DIRECTORY - Type FileType `protobuf:"varint,5,opt,name=type,enum=tes.FileType" json:"type,omitempty"` + Type FileType `protobuf:"varint,5,opt,name=type,proto3,enum=tes.FileType" json:"type,omitempty"` // OPTIONAL // // File content literal. @@ -356,62 +441,93 @@ type Input struct { // UTF-8 encoded // // If content is not empty, "url" must be ignored. - Content string `protobuf:"bytes,6,opt,name=content" json:"content,omitempty"` + Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *Input) Reset() { + *x = Input{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Input) Reset() { *m = Input{} } -func (m *Input) String() string { return proto.CompactTextString(m) } -func (*Input) ProtoMessage() {} -func (*Input) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (x *Input) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Input) ProtoMessage() {} + +func (x *Input) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Input.ProtoReflect.Descriptor instead. +func (*Input) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{1} +} -func (m *Input) GetName() string { - if m != nil { - return m.Name +func (x *Input) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Input) GetDescription() string { - if m != nil { - return m.Description +func (x *Input) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Input) GetUrl() string { - if m != nil { - return m.Url +func (x *Input) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *Input) GetPath() string { - if m != nil { - return m.Path +func (x *Input) GetPath() string { + if x != nil { + return x.Path } return "" } -func (m *Input) GetType() FileType { - if m != nil { - return m.Type +func (x *Input) GetType() FileType { + if x != nil { + return x.Type } return FileType_FILE } -func (m *Input) GetContent() string { - if m != nil { - return m.Content +func (x *Input) GetContent() string { + if x != nil { + return x.Content } return "" } // Output describes Task output files. type Output struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // OPTIONAL - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // OPTIONAL - Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // REQUIRED // // URL in long term storage, for example: @@ -420,60 +536,91 @@ type Output struct { // file:///path/to/my/file // /path/to/my/file // etc... - Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` // REQUIRED // // Path of the file inside the container. // Must be an absolute path. - Path string `protobuf:"bytes,4,opt,name=path" json:"path,omitempty"` + Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` // REQUIRED // // Type of the file, FILE or DIRECTORY - Type FileType `protobuf:"varint,5,opt,name=type,enum=tes.FileType" json:"type,omitempty"` + Type FileType `protobuf:"varint,5,opt,name=type,proto3,enum=tes.FileType" json:"type,omitempty"` } -func (m *Output) Reset() { *m = Output{} } -func (m *Output) String() string { return proto.CompactTextString(m) } -func (*Output) ProtoMessage() {} -func (*Output) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (x *Output) Reset() { + *x = Output{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Output) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Output) ProtoMessage() {} -func (m *Output) GetName() string { - if m != nil { - return m.Name +func (x *Output) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Output.ProtoReflect.Descriptor instead. +func (*Output) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{2} +} + +func (x *Output) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Output) GetDescription() string { - if m != nil { - return m.Description +func (x *Output) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Output) GetUrl() string { - if m != nil { - return m.Url +func (x *Output) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *Output) GetPath() string { - if m != nil { - return m.Path +func (x *Output) GetPath() string { + if x != nil { + return x.Path } return "" } -func (m *Output) GetType() FileType { - if m != nil { - return m.Type +func (x *Output) GetType() FileType { + if x != nil { + return x.Type } return FileType_FILE } // Executor describes a command to be executed, and its environment. type Executor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // REQUIRED // // Name of the container image, for example: @@ -481,152 +628,210 @@ type Executor struct { // quay.io/aptible/ubuntu // gcr.io/my-org/my-image // etc... - Image string `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` + Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` // REQUIRED // // A sequence of program arguments to execute, where the first argument // is the program to execute (i.e. argv). - Command []string `protobuf:"bytes,2,rep,name=command" json:"command,omitempty"` + Command []string `protobuf:"bytes,2,rep,name=command,proto3" json:"command,omitempty"` // OPTIONAL // // The working directory that the command will be executed in. // Defaults to the directory set by the container image. - Workdir string `protobuf:"bytes,3,opt,name=workdir" json:"workdir,omitempty"` + Workdir string `protobuf:"bytes,3,opt,name=workdir,proto3" json:"workdir,omitempty"` // OPTIONAL // // Path inside the container to a file which will be piped // to the executor's stdin. Must be an absolute path. - Stdin string `protobuf:"bytes,6,opt,name=stdin" json:"stdin,omitempty"` + Stdin string `protobuf:"bytes,6,opt,name=stdin,proto3" json:"stdin,omitempty"` // OPTIONAL // // Path inside the container to a file where the executor's // stdout will be written to. Must be an absolute path. - Stdout string `protobuf:"bytes,4,opt,name=stdout" json:"stdout,omitempty"` + Stdout string `protobuf:"bytes,4,opt,name=stdout,proto3" json:"stdout,omitempty"` // OPTIONAL // // Path inside the container to a file where the executor's // stderr will be written to. Must be an absolute path. - Stderr string `protobuf:"bytes,5,opt,name=stderr" json:"stderr,omitempty"` + Stderr string `protobuf:"bytes,5,opt,name=stderr,proto3" json:"stderr,omitempty"` // OPTIONAL // // Enviromental variables to set within the container. - Env map[string]string `protobuf:"bytes,8,rep,name=env" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Env map[string]string `protobuf:"bytes,8,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Executor) Reset() { + *x = Executor{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Executor) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Executor) Reset() { *m = Executor{} } -func (m *Executor) String() string { return proto.CompactTextString(m) } -func (*Executor) ProtoMessage() {} -func (*Executor) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (*Executor) ProtoMessage() {} -func (m *Executor) GetImage() string { - if m != nil { - return m.Image +func (x *Executor) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Executor.ProtoReflect.Descriptor instead. +func (*Executor) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{3} +} + +func (x *Executor) GetImage() string { + if x != nil { + return x.Image } return "" } -func (m *Executor) GetCommand() []string { - if m != nil { - return m.Command +func (x *Executor) GetCommand() []string { + if x != nil { + return x.Command } return nil } -func (m *Executor) GetWorkdir() string { - if m != nil { - return m.Workdir +func (x *Executor) GetWorkdir() string { + if x != nil { + return x.Workdir } return "" } -func (m *Executor) GetStdin() string { - if m != nil { - return m.Stdin +func (x *Executor) GetStdin() string { + if x != nil { + return x.Stdin } return "" } -func (m *Executor) GetStdout() string { - if m != nil { - return m.Stdout +func (x *Executor) GetStdout() string { + if x != nil { + return x.Stdout } return "" } -func (m *Executor) GetStderr() string { - if m != nil { - return m.Stderr +func (x *Executor) GetStderr() string { + if x != nil { + return x.Stderr } return "" } -func (m *Executor) GetEnv() map[string]string { - if m != nil { - return m.Env +func (x *Executor) GetEnv() map[string]string { + if x != nil { + return x.Env } return nil } // Resources describes the resources requested by a task. type Resources struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // OPTIONAL // // Requested number of CPUs - CpuCores uint32 `protobuf:"varint,1,opt,name=cpu_cores,json=cpuCores" json:"cpu_cores,omitempty"` + CpuCores uint32 `protobuf:"varint,1,opt,name=cpu_cores,json=cpuCores,proto3" json:"cpu_cores,omitempty"` // OPTIONAL // // Is the task allowed to run on preemptible compute instances (e.g. AWS Spot)? - Preemptible bool `protobuf:"varint,2,opt,name=preemptible" json:"preemptible,omitempty"` + Preemptible bool `protobuf:"varint,2,opt,name=preemptible,proto3" json:"preemptible,omitempty"` // OPTIONAL // // Requested RAM required in gigabytes (GB) - RamGb float64 `protobuf:"fixed64,3,opt,name=ram_gb,json=ramGb" json:"ram_gb,omitempty"` + RamGb float64 `protobuf:"fixed64,3,opt,name=ram_gb,json=ramGb,proto3" json:"ram_gb,omitempty"` // OPTIONAL // // Requested disk size in gigabytes (GB) - DiskGb float64 `protobuf:"fixed64,4,opt,name=disk_gb,json=diskGb" json:"disk_gb,omitempty"` + DiskGb float64 `protobuf:"fixed64,4,opt,name=disk_gb,json=diskGb,proto3" json:"disk_gb,omitempty"` // OPTIONAL // // Request that the task be run in these compute zones. - Zones []string `protobuf:"bytes,5,rep,name=zones" json:"zones,omitempty"` + Zones []string `protobuf:"bytes,5,rep,name=zones,proto3" json:"zones,omitempty"` +} + +func (x *Resources) Reset() { + *x = Resources{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Resources) Reset() { *m = Resources{} } -func (m *Resources) String() string { return proto.CompactTextString(m) } -func (*Resources) ProtoMessage() {} -func (*Resources) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (x *Resources) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Resources) ProtoMessage() {} + +func (x *Resources) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Resources.ProtoReflect.Descriptor instead. +func (*Resources) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{4} +} -func (m *Resources) GetCpuCores() uint32 { - if m != nil { - return m.CpuCores +func (x *Resources) GetCpuCores() uint32 { + if x != nil { + return x.CpuCores } return 0 } -func (m *Resources) GetPreemptible() bool { - if m != nil { - return m.Preemptible +func (x *Resources) GetPreemptible() bool { + if x != nil { + return x.Preemptible } return false } -func (m *Resources) GetRamGb() float64 { - if m != nil { - return m.RamGb +func (x *Resources) GetRamGb() float64 { + if x != nil { + return x.RamGb } return 0 } -func (m *Resources) GetDiskGb() float64 { - if m != nil { - return m.DiskGb +func (x *Resources) GetDiskGb() float64 { + if x != nil { + return x.DiskGb } return 0 } -func (m *Resources) GetZones() []string { - if m != nil { - return m.Zones +func (x *Resources) GetZones() []string { + if x != nil { + return x.Zones } return nil } @@ -635,27 +840,31 @@ func (m *Resources) GetZones() []string { // // TaskLog describes logging information related to a Task. type TaskLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // REQUIRED // // Logs for each executor - Logs []*ExecutorLog `protobuf:"bytes,1,rep,name=logs" json:"logs,omitempty"` + Logs []*ExecutorLog `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` // OPTIONAL // // Arbitrary logging metadata included by the implementation. - Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // OPTIONAL // // When the task started, in RFC 3339 format. - StartTime string `protobuf:"bytes,3,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + StartTime string `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // OPTIONAL // // When the task ended, in RFC 3339 format. - EndTime string `protobuf:"bytes,4,opt,name=end_time,json=endTime" json:"end_time,omitempty"` + EndTime string `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // REQUIRED // // Information about all output files. Directory outputs are // flattened into separate items. - Outputs []*OutputFileLog `protobuf:"bytes,5,rep,name=outputs" json:"outputs,omitempty"` + Outputs []*OutputFileLog `protobuf:"bytes,5,rep,name=outputs,proto3" json:"outputs,omitempty"` // OPTIONAL // // System logs are any logs the system decides are relevant, @@ -669,52 +878,79 @@ type TaskLog struct { // a SYSTEM_ERROR state (e.g. disk is full), etc. // // System logs are only included in the FULL task view. - SystemLogs []string `protobuf:"bytes,6,rep,name=system_logs,json=systemLogs" json:"system_logs,omitempty"` + SystemLogs []string `protobuf:"bytes,6,rep,name=system_logs,json=systemLogs,proto3" json:"system_logs,omitempty"` } -func (m *TaskLog) Reset() { *m = TaskLog{} } -func (m *TaskLog) String() string { return proto.CompactTextString(m) } -func (*TaskLog) ProtoMessage() {} -func (*TaskLog) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (x *TaskLog) Reset() { + *x = TaskLog{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskLog) ProtoMessage() {} -func (m *TaskLog) GetLogs() []*ExecutorLog { - if m != nil { - return m.Logs +func (x *TaskLog) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskLog.ProtoReflect.Descriptor instead. +func (*TaskLog) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{5} +} + +func (x *TaskLog) GetLogs() []*ExecutorLog { + if x != nil { + return x.Logs } return nil } -func (m *TaskLog) GetMetadata() map[string]string { - if m != nil { - return m.Metadata +func (x *TaskLog) GetMetadata() map[string]string { + if x != nil { + return x.Metadata } return nil } -func (m *TaskLog) GetStartTime() string { - if m != nil { - return m.StartTime +func (x *TaskLog) GetStartTime() string { + if x != nil { + return x.StartTime } return "" } -func (m *TaskLog) GetEndTime() string { - if m != nil { - return m.EndTime +func (x *TaskLog) GetEndTime() string { + if x != nil { + return x.EndTime } return "" } -func (m *TaskLog) GetOutputs() []*OutputFileLog { - if m != nil { - return m.Outputs +func (x *TaskLog) GetOutputs() []*OutputFileLog { + if x != nil { + return x.Outputs } return nil } -func (m *TaskLog) GetSystemLogs() []string { - if m != nil { - return m.SystemLogs +func (x *TaskLog) GetSystemLogs() []string { + if x != nil { + return x.SystemLogs } return nil } @@ -723,14 +959,18 @@ func (m *TaskLog) GetSystemLogs() []string { // // ExecutorLog describes logging information related to an Executor. type ExecutorLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // OPTIONAL // // Time the executor started, in RFC 3339 format. - StartTime string `protobuf:"bytes,2,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + StartTime string `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // OPTIONAL // // Time the executor ended, in RFC 3339 format. - EndTime string `protobuf:"bytes,3,opt,name=end_time,json=endTime" json:"end_time,omitempty"` + EndTime string `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // OPTIONAL // // Stdout content. @@ -742,7 +982,7 @@ type ExecutorLog struct { // In order to capture the full stdout users should set Executor.stdout // to a container file path, and use Task.outputs to upload that file // to permanent storage. - Stdout string `protobuf:"bytes,4,opt,name=stdout" json:"stdout,omitempty"` + Stdout string `protobuf:"bytes,4,opt,name=stdout,proto3" json:"stdout,omitempty"` // OPTIONAL // // Stderr content. @@ -754,49 +994,76 @@ type ExecutorLog struct { // In order to capture the full stderr users should set Executor.stderr // to a container file path, and use Task.outputs to upload that file // to permanent storage. - Stderr string `protobuf:"bytes,5,opt,name=stderr" json:"stderr,omitempty"` + Stderr string `protobuf:"bytes,5,opt,name=stderr,proto3" json:"stderr,omitempty"` // REQUIRED // // Exit code. - ExitCode int32 `protobuf:"varint,6,opt,name=exit_code,json=exitCode" json:"exit_code,omitempty"` + ExitCode int32 `protobuf:"varint,6,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` +} + +func (x *ExecutorLog) Reset() { + *x = ExecutorLog{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutorLog) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ExecutorLog) Reset() { *m = ExecutorLog{} } -func (m *ExecutorLog) String() string { return proto.CompactTextString(m) } -func (*ExecutorLog) ProtoMessage() {} -func (*ExecutorLog) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*ExecutorLog) ProtoMessage() {} -func (m *ExecutorLog) GetStartTime() string { - if m != nil { - return m.StartTime +func (x *ExecutorLog) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutorLog.ProtoReflect.Descriptor instead. +func (*ExecutorLog) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{6} +} + +func (x *ExecutorLog) GetStartTime() string { + if x != nil { + return x.StartTime } return "" } -func (m *ExecutorLog) GetEndTime() string { - if m != nil { - return m.EndTime +func (x *ExecutorLog) GetEndTime() string { + if x != nil { + return x.EndTime } return "" } -func (m *ExecutorLog) GetStdout() string { - if m != nil { - return m.Stdout +func (x *ExecutorLog) GetStdout() string { + if x != nil { + return x.Stdout } return "" } -func (m *ExecutorLog) GetStderr() string { - if m != nil { - return m.Stderr +func (x *ExecutorLog) GetStderr() string { + if x != nil { + return x.Stderr } return "" } -func (m *ExecutorLog) GetExitCode() int32 { - if m != nil { - return m.ExitCode +func (x *ExecutorLog) GetExitCode() int32 { + if x != nil { + return x.ExitCode } return 0 } @@ -807,42 +1074,73 @@ func (m *ExecutorLog) GetExitCode() int32 { // file details after the task has completed successfully, // for logging purposes. type OutputFileLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // REQUIRED // // URL of the file in storage, e.g. s3://bucket/file.txt - Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // REQUIRED // // Path of the file inside the container. Must be an absolute path. - Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // REQUIRED // // Size of the file in bytes. - SizeBytes int64 `protobuf:"varint,3,opt,name=size_bytes,json=sizeBytes" json:"size_bytes,omitempty"` + SizeBytes int64 `protobuf:"varint,3,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` +} + +func (x *OutputFileLog) Reset() { + *x = OutputFileLog{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *OutputFileLog) Reset() { *m = OutputFileLog{} } -func (m *OutputFileLog) String() string { return proto.CompactTextString(m) } -func (*OutputFileLog) ProtoMessage() {} -func (*OutputFileLog) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (x *OutputFileLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputFileLog) ProtoMessage() {} + +func (x *OutputFileLog) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputFileLog.ProtoReflect.Descriptor instead. +func (*OutputFileLog) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{7} +} -func (m *OutputFileLog) GetUrl() string { - if m != nil { - return m.Url +func (x *OutputFileLog) GetUrl() string { + if x != nil { + return x.Url } return "" } -func (m *OutputFileLog) GetPath() string { - if m != nil { - return m.Path +func (x *OutputFileLog) GetPath() string { + if x != nil { + return x.Path } return "" } -func (m *OutputFileLog) GetSizeBytes() int64 { - if m != nil { - return m.SizeBytes +func (x *OutputFileLog) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes } return 0 } @@ -851,131 +1149,224 @@ func (m *OutputFileLog) GetSizeBytes() int64 { // // CreateTaskResponse describes a response from the CreateTask endpoint. type CreateTaskResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // REQUIRED // // Task identifier assigned by the server. - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} } -func (m *CreateTaskResponse) String() string { return proto.CompactTextString(m) } -func (*CreateTaskResponse) ProtoMessage() {} -func (*CreateTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (x *CreateTaskResponse) Reset() { + *x = CreateTaskResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTaskResponse) ProtoMessage() {} -func (m *CreateTaskResponse) GetId() string { - if m != nil { - return m.Id +func (x *CreateTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTaskResponse.ProtoReflect.Descriptor instead. +func (*CreateTaskResponse) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateTaskResponse) GetId() string { + if x != nil { + return x.Id } return "" } // GetTaskRequest describes a request to the GetTask endpoint. type GetTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // REQUIRED // // Task identifier. - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // OPTIONAL // // Affects the fields included in the returned Task messages. // See TaskView below. - View TaskView `protobuf:"varint,2,opt,name=view,enum=tes.TaskView" json:"view,omitempty"` + View TaskView `protobuf:"varint,2,opt,name=view,proto3,enum=tes.TaskView" json:"view,omitempty"` +} + +func (x *GetTaskRequest) Reset() { + *x = GetTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetTaskRequest) Reset() { *m = GetTaskRequest{} } -func (m *GetTaskRequest) String() string { return proto.CompactTextString(m) } -func (*GetTaskRequest) ProtoMessage() {} -func (*GetTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*GetTaskRequest) ProtoMessage() {} -func (m *GetTaskRequest) GetId() string { - if m != nil { - return m.Id +func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead. +func (*GetTaskRequest) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{9} +} + +func (x *GetTaskRequest) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *GetTaskRequest) GetView() TaskView { - if m != nil { - return m.View +func (x *GetTaskRequest) GetView() TaskView { + if x != nil { + return x.View } return TaskView_MINIMAL } // ListTasksRequest describes a request to the ListTasks service endpoint. type ListTasksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // OPTIONAL // // Number of tasks to return in one page. // Must be less than 2048. Defaults to 256. - PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize" json:"page_size,omitempty"` + PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // OPTIONAL // // Page token is used to retrieve the next page of results. // If unspecified, returns the first page of results. // See ListTasksResponse.next_page_token - PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // OPTIONAL // // Affects the fields included in the returned Task messages. // See TaskView below. - View TaskView `protobuf:"varint,5,opt,name=view,enum=tes.TaskView" json:"view,omitempty"` + View TaskView `protobuf:"varint,5,opt,name=view,proto3,enum=tes.TaskView" json:"view,omitempty"` // OPTIONAL // // Filter tasks by state. // Filtering by the UNKNOWN state is not allowed. - State State `protobuf:"varint,6,opt,name=state,enum=tes.State" json:"state,omitempty"` + State State `protobuf:"varint,6,opt,name=state,proto3,enum=tes.State" json:"state,omitempty"` // OPTIONAL // // Filter tasks based on the Task.tags field. // A tag filter matches a Task tag if both the key and value are exact matches. // - // Filter Tags Match? - // ---------------------------------------------------------------------- - // {"foo": "bar"} {"foo": "bar"} Yes - // {"foo": ""} {"foo": ""} Yes - // {"foo": "bar", "baz": "bat"} {"foo": "bar", "baz": "bat"} Yes - // {"foo": "bar"} {"foo": "bar", "baz": "bat"} Yes - // {"foo": "bar", "baz": "bat"} {"foo": "bar"} No - // {"foo": ""} {"foo": "bar"} No - Tags map[string]string `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Filter Tags Match? + // ---------------------------------------------------------------------- + // {"foo": "bar"} {"foo": "bar"} Yes + // {"foo": ""} {"foo": ""} Yes + // {"foo": "bar", "baz": "bat"} {"foo": "bar", "baz": "bat"} Yes + // {"foo": "bar"} {"foo": "bar", "baz": "bat"} Yes + // {"foo": "bar", "baz": "bat"} {"foo": "bar"} No + // {"foo": ""} {"foo": "bar"} No + Tags map[string]string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ListTasksRequest) Reset() { + *x = ListTasksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ListTasksRequest) Reset() { *m = ListTasksRequest{} } -func (m *ListTasksRequest) String() string { return proto.CompactTextString(m) } -func (*ListTasksRequest) ProtoMessage() {} -func (*ListTasksRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (x *ListTasksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTasksRequest) ProtoMessage() {} + +func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTasksRequest.ProtoReflect.Descriptor instead. +func (*ListTasksRequest) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{10} +} -func (m *ListTasksRequest) GetPageSize() uint32 { - if m != nil { - return m.PageSize +func (x *ListTasksRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize } return 0 } -func (m *ListTasksRequest) GetPageToken() string { - if m != nil { - return m.PageToken +func (x *ListTasksRequest) GetPageToken() string { + if x != nil { + return x.PageToken } return "" } -func (m *ListTasksRequest) GetView() TaskView { - if m != nil { - return m.View +func (x *ListTasksRequest) GetView() TaskView { + if x != nil { + return x.View } return TaskView_MINIMAL } -func (m *ListTasksRequest) GetState() State { - if m != nil { - return m.State +func (x *ListTasksRequest) GetState() State { + if x != nil { + return x.State } return State_UNKNOWN } -func (m *ListTasksRequest) GetTags() map[string]string { - if m != nil { - return m.Tags +func (x *ListTasksRequest) GetTags() map[string]string { + if x != nil { + return x.Tags } return nil } @@ -984,469 +1375,784 @@ func (m *ListTasksRequest) GetTags() map[string]string { // // ListTasksResponse describes a response from the ListTasks endpoint. type ListTasksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // REQUIRED // // List of tasks. - Tasks []*Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"` + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` // OPTIONAL // // Token used to return the next page of results. // See TaskListRequest.next_page_token - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` } -func (m *ListTasksResponse) Reset() { *m = ListTasksResponse{} } -func (m *ListTasksResponse) String() string { return proto.CompactTextString(m) } -func (*ListTasksResponse) ProtoMessage() {} -func (*ListTasksResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (x *ListTasksResponse) Reset() { + *x = ListTasksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTasksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTasksResponse) ProtoMessage() {} -func (m *ListTasksResponse) GetTasks() []*Task { - if m != nil { - return m.Tasks +func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTasksResponse.ProtoReflect.Descriptor instead. +func (*ListTasksResponse) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{11} +} + +func (x *ListTasksResponse) GetTasks() []*Task { + if x != nil { + return x.Tasks } return nil } -func (m *ListTasksResponse) GetNextPageToken() string { - if m != nil { - return m.NextPageToken +func (x *ListTasksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken } return "" } // CancelTaskRequest describes a request to the CancelTask endpoint. type CancelTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // REQUIRED // // Task identifier. - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (m *CancelTaskRequest) Reset() { *m = CancelTaskRequest{} } -func (m *CancelTaskRequest) String() string { return proto.CompactTextString(m) } -func (*CancelTaskRequest) ProtoMessage() {} -func (*CancelTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } - -func (m *CancelTaskRequest) GetId() string { - if m != nil { - return m.Id +func (x *CancelTaskRequest) Reset() { + *x = CancelTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -// OUTPUT ONLY -// -// CancelTaskResponse describes a response from the CancelTask endpoint. -type CancelTaskResponse struct { +func (x *CancelTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CancelTaskResponse) Reset() { *m = CancelTaskResponse{} } -func (m *CancelTaskResponse) String() string { return proto.CompactTextString(m) } -func (*CancelTaskResponse) ProtoMessage() {} -func (*CancelTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (*CancelTaskRequest) ProtoMessage() {} -// ServiceInfoRequest describes a request to the ServiceInfo endpoint. -type ServiceInfoRequest struct { +func (x *CancelTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *ServiceInfoRequest) Reset() { *m = ServiceInfoRequest{} } -func (m *ServiceInfoRequest) String() string { return proto.CompactTextString(m) } -func (*ServiceInfoRequest) ProtoMessage() {} -func (*ServiceInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } - -// OUTPUT ONLY -// -// ServiceInfo describes information about the service, -// such as storage details, resource availability, -// and other documentation. -type ServiceInfo struct { - // Returns the name of the service, e.g. "ohsu-compbio-funnel". - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Returns a documentation string, e.g. "Hey, we're OHSU Comp. Bio!". - Doc string `protobuf:"bytes,2,opt,name=doc" json:"doc,omitempty"` - // Lists some, but not necessarily all, storage locations supported by the service. - // - // Must be in a valid URL format. - // e.g. - // file:///path/to/local/funnel-storage - // s3://ohsu-compbio-funnel/storage - // etc. - Storage []string `protobuf:"bytes,3,rep,name=storage" json:"storage,omitempty"` - TaskStateCounts map[string]int32 `protobuf:"bytes,4,rep,name=task_state_counts,json=taskStateCounts" json:"task_state_counts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` +// Deprecated: Use CancelTaskRequest.ProtoReflect.Descriptor instead. +func (*CancelTaskRequest) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{12} } -func (m *ServiceInfo) Reset() { *m = ServiceInfo{} } -func (m *ServiceInfo) String() string { return proto.CompactTextString(m) } -func (*ServiceInfo) ProtoMessage() {} -func (*ServiceInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } - -func (m *ServiceInfo) GetName() string { - if m != nil { - return m.Name +func (x *CancelTaskRequest) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *ServiceInfo) GetDoc() string { - if m != nil { - return m.Doc - } - return "" +// OUTPUT ONLY +// +// CancelTaskResponse describes a response from the CancelTask endpoint. +type CancelTaskResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *ServiceInfo) GetStorage() []string { - if m != nil { - return m.Storage +func (x *CancelTaskResponse) Reset() { + *x = CancelTaskResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (m *ServiceInfo) GetTaskStateCounts() map[string]int32 { - if m != nil { - return m.TaskStateCounts - } - return nil +func (x *CancelTaskResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func init() { - proto.RegisterType((*Task)(nil), "tes.Task") - proto.RegisterType((*Input)(nil), "tes.Input") - proto.RegisterType((*Output)(nil), "tes.Output") - proto.RegisterType((*Executor)(nil), "tes.Executor") - proto.RegisterType((*Resources)(nil), "tes.Resources") - proto.RegisterType((*TaskLog)(nil), "tes.TaskLog") - proto.RegisterType((*ExecutorLog)(nil), "tes.ExecutorLog") - proto.RegisterType((*OutputFileLog)(nil), "tes.OutputFileLog") - proto.RegisterType((*CreateTaskResponse)(nil), "tes.CreateTaskResponse") - proto.RegisterType((*GetTaskRequest)(nil), "tes.GetTaskRequest") - proto.RegisterType((*ListTasksRequest)(nil), "tes.ListTasksRequest") - proto.RegisterType((*ListTasksResponse)(nil), "tes.ListTasksResponse") - proto.RegisterType((*CancelTaskRequest)(nil), "tes.CancelTaskRequest") - proto.RegisterType((*CancelTaskResponse)(nil), "tes.CancelTaskResponse") - proto.RegisterType((*ServiceInfoRequest)(nil), "tes.ServiceInfoRequest") - proto.RegisterType((*ServiceInfo)(nil), "tes.ServiceInfo") - proto.RegisterEnum("tes.FileType", FileType_name, FileType_value) - proto.RegisterEnum("tes.State", State_name, State_value) - proto.RegisterEnum("tes.TaskView", TaskView_name, TaskView_value) -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// Client API for TaskService service +func (*CancelTaskResponse) ProtoMessage() {} -type TaskServiceClient interface { - // GetServiceInfo provides information about the service, - // such as storage details, resource availability, and - // other documentation. - GetServiceInfo(ctx context.Context, in *ServiceInfoRequest, opts ...grpc.CallOption) (*ServiceInfo, error) - // Create a new task. - CreateTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*CreateTaskResponse, error) - // List tasks. - // TaskView is requested as such: "v1/tasks?view=BASIC" - // Filter examples: - // "v1/tasks?view=MINIMAL&tags[workflowID]=e59fb57a-eb87-4c02-b7e2-562b586b5db3" - // "v1/tasks?state=RUNNING" - ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) - // Get a task. - // TaskView is requested as such: "v1/tasks/{id}?view=FULL" - GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) - // Cancel a task. - CancelTask(ctx context.Context, in *CancelTaskRequest, opts ...grpc.CallOption) (*CancelTaskResponse, error) +func (x *CancelTaskResponse) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type taskServiceClient struct { - cc *grpc.ClientConn +// Deprecated: Use CancelTaskResponse.ProtoReflect.Descriptor instead. +func (*CancelTaskResponse) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{13} } -func NewTaskServiceClient(cc *grpc.ClientConn) TaskServiceClient { - return &taskServiceClient{cc} +// ServiceInfoRequest describes a request to the ServiceInfo endpoint. +type ServiceInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (c *taskServiceClient) GetServiceInfo(ctx context.Context, in *ServiceInfoRequest, opts ...grpc.CallOption) (*ServiceInfo, error) { - out := new(ServiceInfo) - err := grpc.Invoke(ctx, "/tes.TaskService/GetServiceInfo", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *ServiceInfoRequest) Reset() { + *x = ServiceInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return out, nil } -func (c *taskServiceClient) CreateTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*CreateTaskResponse, error) { - out := new(CreateTaskResponse) - err := grpc.Invoke(ctx, "/tes.TaskService/CreateTask", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +func (x *ServiceInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (c *taskServiceClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { - out := new(ListTasksResponse) - err := grpc.Invoke(ctx, "/tes.TaskService/ListTasks", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} +func (*ServiceInfoRequest) ProtoMessage() {} -func (c *taskServiceClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) { - out := new(Task) - err := grpc.Invoke(ctx, "/tes.TaskService/GetTask", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *ServiceInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return out, nil + return mi.MessageOf(x) } -func (c *taskServiceClient) CancelTask(ctx context.Context, in *CancelTaskRequest, opts ...grpc.CallOption) (*CancelTaskResponse, error) { - out := new(CancelTaskResponse) - err := grpc.Invoke(ctx, "/tes.TaskService/CancelTask", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +// Deprecated: Use ServiceInfoRequest.ProtoReflect.Descriptor instead. +func (*ServiceInfoRequest) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{14} } -// Server API for TaskService service +// OUTPUT ONLY +// +// ServiceInfo describes information about the service, +// such as storage details, resource availability, +// and other documentation. +type ServiceInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Returns the name of the service, e.g. "ohsu-compbio-funnel". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Returns a documentation string, e.g. "Hey, we're OHSU Comp. Bio!". + Doc string `protobuf:"bytes,2,opt,name=doc,proto3" json:"doc,omitempty"` + // Lists some, but not necessarily all, storage locations supported by the service. + // + // Must be in a valid URL format. + // e.g. + // file:///path/to/local/funnel-storage + // s3://ohsu-compbio-funnel/storage + // etc. + Storage []string `protobuf:"bytes,3,rep,name=storage,proto3" json:"storage,omitempty"` + TaskStateCounts map[string]int32 `protobuf:"bytes,4,rep,name=task_state_counts,json=taskStateCounts,proto3" json:"task_state_counts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} -type TaskServiceServer interface { - // GetServiceInfo provides information about the service, - // such as storage details, resource availability, and - // other documentation. - GetServiceInfo(context.Context, *ServiceInfoRequest) (*ServiceInfo, error) - // Create a new task. - CreateTask(context.Context, *Task) (*CreateTaskResponse, error) - // List tasks. - // TaskView is requested as such: "v1/tasks?view=BASIC" - // Filter examples: - // "v1/tasks?view=MINIMAL&tags[workflowID]=e59fb57a-eb87-4c02-b7e2-562b586b5db3" - // "v1/tasks?state=RUNNING" - ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) - // Get a task. - // TaskView is requested as such: "v1/tasks/{id}?view=FULL" - GetTask(context.Context, *GetTaskRequest) (*Task, error) - // Cancel a task. - CancelTask(context.Context, *CancelTaskRequest) (*CancelTaskResponse, error) +func (x *ServiceInfo) Reset() { + *x = ServiceInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_tes_tes_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func RegisterTaskServiceServer(s *grpc.Server, srv TaskServiceServer) { - s.RegisterService(&_TaskService_serviceDesc, srv) +func (x *ServiceInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func _TaskService_GetServiceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ServiceInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskServiceServer).GetServiceInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tes.TaskService/GetServiceInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskServiceServer).GetServiceInfo(ctx, req.(*ServiceInfoRequest)) +func (*ServiceInfo) ProtoMessage() {} + +func (x *ServiceInfo) ProtoReflect() protoreflect.Message { + mi := &file_tes_tes_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return interceptor(ctx, in, info, handler) + return mi.MessageOf(x) } -func _TaskService_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Task) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskServiceServer).CreateTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tes.TaskService/CreateTask", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskServiceServer).CreateTask(ctx, req.(*Task)) - } - return interceptor(ctx, in, info, handler) +// Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead. +func (*ServiceInfo) Descriptor() ([]byte, []int) { + return file_tes_tes_proto_rawDescGZIP(), []int{15} } -func _TaskService_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTasksRequest) - if err := dec(in); err != nil { - return nil, err +func (x *ServiceInfo) GetName() string { + if x != nil { + return x.Name } - if interceptor == nil { - return srv.(TaskServiceServer).ListTasks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tes.TaskService/ListTasks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskServiceServer).ListTasks(ctx, req.(*ListTasksRequest)) - } - return interceptor(ctx, in, info, handler) + return "" } -func _TaskService_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTaskRequest) - if err := dec(in); err != nil { - return nil, err +func (x *ServiceInfo) GetDoc() string { + if x != nil { + return x.Doc } - if interceptor == nil { - return srv.(TaskServiceServer).GetTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tes.TaskService/GetTask", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskServiceServer).GetTask(ctx, req.(*GetTaskRequest)) - } - return interceptor(ctx, in, info, handler) + return "" } -func _TaskService_CancelTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelTaskRequest) - if err := dec(in); err != nil { - return nil, err +func (x *ServiceInfo) GetStorage() []string { + if x != nil { + return x.Storage } - if interceptor == nil { - return srv.(TaskServiceServer).CancelTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tes.TaskService/CancelTask", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskServiceServer).CancelTask(ctx, req.(*CancelTaskRequest)) + return nil +} + +func (x *ServiceInfo) GetTaskStateCounts() map[string]int32 { + if x != nil { + return x.TaskStateCounts } - return interceptor(ctx, in, info, handler) + return nil } -var _TaskService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tes.TaskService", - HandlerType: (*TaskServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetServiceInfo", - Handler: _TaskService_GetServiceInfo_Handler, - }, - { - MethodName: "CreateTask", - Handler: _TaskService_CreateTask_Handler, - }, - { - MethodName: "ListTasks", - Handler: _TaskService_ListTasks_Handler, - }, - { - MethodName: "GetTask", - Handler: _TaskService_GetTask_Handler, - }, - { - MethodName: "CancelTask", - Handler: _TaskService_CancelTask_Handler, +var File_tes_tes_proto protoreflect.FileDescriptor + +var file_tes_tes_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x03, 0x74, 0x65, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xd7, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x74, 0x65, 0x73, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, + 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x2c, + 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x09, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x09, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x54, 0x61, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x20, 0x0a, 0x04, + 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x74, 0x65, 0x73, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa0, 0x01, 0x0a, + 0x05, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, + 0x87, 0x01, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xfc, 0x01, 0x0a, 0x08, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x64, 0x69, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x64, 0x69, 0x72, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x28, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, + 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x90, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x63, 0x6f, + 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, + 0x72, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x62, + 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, + 0x74, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x61, 0x6d, 0x5f, 0x67, 0x62, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x72, 0x61, 0x6d, 0x47, 0x62, 0x12, 0x17, 0x0a, 0x07, + 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x67, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x64, + 0x69, 0x73, 0x6b, 0x47, 0x62, 0x12, 0x14, 0x0a, 0x05, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x22, 0xad, 0x02, 0x0a, 0x07, + 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x12, 0x24, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x36, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x6f, 0x67, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x2c, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, + 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4c, 0x6f, 0x67, 0x73, 0x1a, 0x3b, + 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x94, 0x01, 0x0a, 0x0b, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, + 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, + 0x64, 0x65, 0x22, 0x54, 0x0a, 0x0d, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x4c, 0x6f, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, + 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, + 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x24, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x43, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x21, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, + 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, + 0x69, 0x65, 0x77, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x56, 0x69, 0x65, + 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x12, 0x20, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, + 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x37, + 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5c, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x74, 0x65, + 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x26, 0x0a, + 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x23, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x14, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xe4, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6f, + 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x6f, 0x63, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x51, 0x0a, 0x11, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x42, 0x0a, 0x14, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x23, 0x0a, + 0x08, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x49, 0x4c, + 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x59, + 0x10, 0x01, 0x2a, 0x8d, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x45, + 0x55, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, + 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, + 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x55, 0x53, 0x45, 0x44, 0x10, 0x04, + 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x12, 0x12, + 0x0a, 0x0e, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, + 0x10, 0x08, 0x2a, 0x2c, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x56, 0x69, 0x65, 0x77, 0x12, 0x0b, + 0x0a, 0x07, 0x4d, 0x49, 0x4e, 0x49, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x42, + 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, + 0x32, 0xa2, 0x03, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x46, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x09, + 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x1a, 0x17, 0x2e, 0x74, 0x65, 0x73, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x4d, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x15, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, + 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x76, + 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x12, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x5c, 0x0a, 0x0a, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x17, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x3a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x5b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x73, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2d, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x25, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x68, 0x73, 0x75, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x2d, 0x62, 0x69, + 0x6f, 0x2f, 0x66, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tes_tes_proto_rawDescOnce sync.Once + file_tes_tes_proto_rawDescData = file_tes_tes_proto_rawDesc +) + +func file_tes_tes_proto_rawDescGZIP() []byte { + file_tes_tes_proto_rawDescOnce.Do(func() { + file_tes_tes_proto_rawDescData = protoimpl.X.CompressGZIP(file_tes_tes_proto_rawDescData) + }) + return file_tes_tes_proto_rawDescData +} + +var file_tes_tes_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_tes_tes_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_tes_tes_proto_goTypes = []interface{}{ + (FileType)(0), // 0: tes.FileType + (State)(0), // 1: tes.State + (TaskView)(0), // 2: tes.TaskView + (*Task)(nil), // 3: tes.Task + (*Input)(nil), // 4: tes.Input + (*Output)(nil), // 5: tes.Output + (*Executor)(nil), // 6: tes.Executor + (*Resources)(nil), // 7: tes.Resources + (*TaskLog)(nil), // 8: tes.TaskLog + (*ExecutorLog)(nil), // 9: tes.ExecutorLog + (*OutputFileLog)(nil), // 10: tes.OutputFileLog + (*CreateTaskResponse)(nil), // 11: tes.CreateTaskResponse + (*GetTaskRequest)(nil), // 12: tes.GetTaskRequest + (*ListTasksRequest)(nil), // 13: tes.ListTasksRequest + (*ListTasksResponse)(nil), // 14: tes.ListTasksResponse + (*CancelTaskRequest)(nil), // 15: tes.CancelTaskRequest + (*CancelTaskResponse)(nil), // 16: tes.CancelTaskResponse + (*ServiceInfoRequest)(nil), // 17: tes.ServiceInfoRequest + (*ServiceInfo)(nil), // 18: tes.ServiceInfo + nil, // 19: tes.Task.TagsEntry + nil, // 20: tes.Executor.EnvEntry + nil, // 21: tes.TaskLog.MetadataEntry + nil, // 22: tes.ListTasksRequest.TagsEntry + nil, // 23: tes.ServiceInfo.TaskStateCountsEntry +} +var file_tes_tes_proto_depIdxs = []int32{ + 1, // 0: tes.Task.state:type_name -> tes.State + 4, // 1: tes.Task.inputs:type_name -> tes.Input + 5, // 2: tes.Task.outputs:type_name -> tes.Output + 7, // 3: tes.Task.resources:type_name -> tes.Resources + 6, // 4: tes.Task.executors:type_name -> tes.Executor + 19, // 5: tes.Task.tags:type_name -> tes.Task.TagsEntry + 8, // 6: tes.Task.logs:type_name -> tes.TaskLog + 0, // 7: tes.Input.type:type_name -> tes.FileType + 0, // 8: tes.Output.type:type_name -> tes.FileType + 20, // 9: tes.Executor.env:type_name -> tes.Executor.EnvEntry + 9, // 10: tes.TaskLog.logs:type_name -> tes.ExecutorLog + 21, // 11: tes.TaskLog.metadata:type_name -> tes.TaskLog.MetadataEntry + 10, // 12: tes.TaskLog.outputs:type_name -> tes.OutputFileLog + 2, // 13: tes.GetTaskRequest.view:type_name -> tes.TaskView + 2, // 14: tes.ListTasksRequest.view:type_name -> tes.TaskView + 1, // 15: tes.ListTasksRequest.state:type_name -> tes.State + 22, // 16: tes.ListTasksRequest.tags:type_name -> tes.ListTasksRequest.TagsEntry + 3, // 17: tes.ListTasksResponse.tasks:type_name -> tes.Task + 23, // 18: tes.ServiceInfo.task_state_counts:type_name -> tes.ServiceInfo.TaskStateCountsEntry + 3, // 19: tes.TaskService.CreateTask:input_type -> tes.Task + 13, // 20: tes.TaskService.ListTasks:input_type -> tes.ListTasksRequest + 12, // 21: tes.TaskService.GetTask:input_type -> tes.GetTaskRequest + 15, // 22: tes.TaskService.CancelTask:input_type -> tes.CancelTaskRequest + 17, // 23: tes.TaskService.GetServiceInfo:input_type -> tes.ServiceInfoRequest + 11, // 24: tes.TaskService.CreateTask:output_type -> tes.CreateTaskResponse + 14, // 25: tes.TaskService.ListTasks:output_type -> tes.ListTasksResponse + 3, // 26: tes.TaskService.GetTask:output_type -> tes.Task + 16, // 27: tes.TaskService.CancelTask:output_type -> tes.CancelTaskResponse + 18, // 28: tes.TaskService.GetServiceInfo:output_type -> tes.ServiceInfo + 24, // [24:29] is the sub-list for method output_type + 19, // [19:24] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_tes_tes_proto_init() } +func file_tes_tes_proto_init() { + if File_tes_tes_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tes_tes_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Task); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Input); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Output); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Executor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resources); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutorLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutputFileLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTaskResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTasksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTasksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelTaskResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tes_tes_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tes_tes_proto_rawDesc, + NumEnums: 3, + NumMessages: 21, + NumExtensions: 0, + NumServices: 1, }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "tes.proto", -} - -func init() { proto.RegisterFile("tes.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 1382 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xdf, 0x6e, 0x1b, 0x45, - 0x17, 0xef, 0xda, 0x5e, 0x7b, 0xf7, 0x38, 0x76, 0x37, 0xf3, 0xa5, 0xe9, 0x7e, 0xee, 0xd7, 0xaf, - 0xee, 0xb6, 0x85, 0x28, 0x94, 0x44, 0xa4, 0x52, 0x41, 0xe5, 0x2a, 0x75, 0xb6, 0x91, 0x85, 0xe3, - 0xb4, 0x13, 0x07, 0x28, 0x54, 0xb2, 0x36, 0xbb, 0x83, 0x59, 0xc5, 0xde, 0x35, 0x3b, 0xe3, 0xb4, - 0x29, 0xe2, 0x02, 0x6e, 0xb8, 0x42, 0x42, 0x82, 0x07, 0x40, 0xdc, 0xf3, 0x34, 0x5c, 0xf0, 0x02, - 0x7d, 0x0c, 0x2e, 0xd0, 0x9c, 0x99, 0xf5, 0x9f, 0xa4, 0x2d, 0x2a, 0x37, 0xdc, 0xed, 0xf9, 0x9d, - 0x33, 0xbf, 0x39, 0xff, 0xc7, 0x06, 0x5b, 0x30, 0xbe, 0x31, 0xce, 0x52, 0x91, 0x92, 0xa2, 0x60, - 0xbc, 0xf1, 0xbf, 0x41, 0x9a, 0x0e, 0x86, 0x6c, 0x33, 0x18, 0xc7, 0x9b, 0x41, 0x92, 0xa4, 0x22, - 0x10, 0x71, 0x9a, 0x68, 0x13, 0xef, 0x8f, 0x22, 0x94, 0x7a, 0x01, 0x3f, 0x26, 0x75, 0x28, 0xc4, - 0x91, 0x6b, 0x34, 0x8d, 0x35, 0x9b, 0x16, 0xe2, 0x88, 0x34, 0xc1, 0xe4, 0x22, 0x10, 0xcc, 0x2d, - 0x34, 0x8d, 0xb5, 0xfa, 0x16, 0x6c, 0x48, 0xda, 0x03, 0x89, 0x50, 0xa5, 0x20, 0x04, 0x4a, 0x49, - 0x30, 0x62, 0x6e, 0x11, 0xcf, 0xe0, 0x37, 0x69, 0x42, 0x35, 0x62, 0x3c, 0xcc, 0xe2, 0xb1, 0xbc, - 0xc4, 0x35, 0x51, 0x35, 0x0f, 0x11, 0x0f, 0xca, 0x71, 0x32, 0x9e, 0x08, 0xee, 0x96, 0x9b, 0xc5, - 0xb5, 0xaa, 0x26, 0x6e, 0x4b, 0x88, 0x6a, 0x0d, 0xb9, 0x05, 0x95, 0x74, 0x22, 0xd0, 0xa8, 0x82, - 0x46, 0x55, 0x34, 0xda, 0x47, 0x8c, 0xe6, 0x3a, 0x72, 0x1b, 0xec, 0x8c, 0xf1, 0x74, 0x92, 0x85, - 0x8c, 0xbb, 0x56, 0xd3, 0x58, 0xab, 0x6e, 0xd5, 0xd1, 0x90, 0xe6, 0x28, 0x9d, 0x19, 0x90, 0x77, - 0xc0, 0x66, 0xcf, 0x58, 0x38, 0x11, 0x69, 0xc6, 0x5d, 0x1b, 0x69, 0x6b, 0x68, 0xed, 0x6b, 0x94, - 0xce, 0xf4, 0xc4, 0x85, 0xca, 0x49, 0x3a, 0x9c, 0x8c, 0x18, 0x77, 0xa1, 0x59, 0x5c, 0xb3, 0x69, - 0x2e, 0x92, 0xb7, 0xa1, 0x24, 0x82, 0x01, 0x77, 0xab, 0xc8, 0xf0, 0x1f, 0x64, 0x90, 0x09, 0xdc, - 0xe8, 0x05, 0x03, 0xee, 0x27, 0x22, 0x3b, 0xa5, 0x68, 0x40, 0x9a, 0x50, 0x1a, 0xa6, 0x03, 0xee, - 0x2e, 0xa1, 0xe1, 0xd2, 0xd4, 0xb0, 0x93, 0x0e, 0x28, 0x6a, 0xc8, 0x0d, 0xa8, 0x85, 0x19, 0xc3, - 0x72, 0xf4, 0x45, 0x3c, 0x62, 0x6e, 0x0d, 0xd3, 0xb5, 0x94, 0x83, 0xbd, 0x78, 0xc4, 0x1a, 0xef, - 0x83, 0x3d, 0x65, 0x26, 0x0e, 0x14, 0x8f, 0xd9, 0xa9, 0xae, 0x92, 0xfc, 0x24, 0x2b, 0x60, 0x9e, - 0x04, 0xc3, 0x89, 0x2a, 0x93, 0x4d, 0x95, 0x70, 0xaf, 0xf0, 0x81, 0xe1, 0xfd, 0x62, 0x80, 0x89, - 0x69, 0x9d, 0x16, 0xca, 0x78, 0x75, 0xa1, 0x0a, 0xe7, 0x0b, 0xe5, 0x40, 0x71, 0x92, 0x0d, 0x75, - 0x75, 0xe5, 0xa7, 0xe4, 0x19, 0x07, 0xe2, 0x4b, 0xb7, 0xa4, 0x78, 0xe4, 0x37, 0xb9, 0x0e, 0x25, - 0x71, 0x3a, 0x66, 0x58, 0xe9, 0xba, 0x4e, 0xe8, 0x83, 0x78, 0xc8, 0x7a, 0xa7, 0x63, 0x46, 0x51, - 0x25, 0x73, 0x19, 0xa6, 0x89, 0x60, 0x89, 0x70, 0xcb, 0x78, 0x32, 0x17, 0xbd, 0xef, 0x0d, 0x28, - 0xab, 0xa2, 0xfe, 0xcb, 0x3e, 0x7a, 0x7f, 0x1a, 0x60, 0xe5, 0x7d, 0x20, 0x73, 0x1a, 0x8f, 0x82, - 0x41, 0xee, 0x8c, 0x12, 0x54, 0x18, 0xa3, 0x51, 0x90, 0x44, 0x6e, 0x41, 0xb5, 0x84, 0x16, 0xa5, - 0xe6, 0x69, 0x9a, 0x1d, 0x47, 0x71, 0xa6, 0x3d, 0xc9, 0x45, 0xc9, 0xc4, 0x45, 0x14, 0x27, 0x3a, - 0x70, 0x25, 0x90, 0x55, 0x28, 0x73, 0x11, 0xa5, 0x13, 0xa1, 0xbd, 0xd4, 0x92, 0xc6, 0x59, 0x96, - 0xe9, 0xb9, 0xd1, 0x12, 0x59, 0x83, 0x22, 0x4b, 0x4e, 0x5c, 0x0b, 0x1b, 0x69, 0x75, 0xa1, 0x67, - 0x37, 0xfc, 0xe4, 0x44, 0x35, 0x9d, 0x34, 0x69, 0xdc, 0x05, 0x2b, 0x07, 0xde, 0xa8, 0x57, 0x7e, - 0x34, 0xc0, 0x9e, 0x0e, 0x0d, 0xb9, 0x02, 0x76, 0x38, 0x9e, 0xf4, 0xc3, 0x34, 0x63, 0x1c, 0xcf, - 0xd7, 0xa8, 0x15, 0x8e, 0x27, 0x2d, 0x29, 0xcb, 0xa2, 0x8c, 0x33, 0xc6, 0x46, 0x63, 0x11, 0x1f, - 0x0d, 0x15, 0x95, 0x45, 0xe7, 0x21, 0x72, 0x09, 0xca, 0x59, 0x30, 0xea, 0x0f, 0x8e, 0x30, 0x1b, - 0x06, 0x35, 0xb3, 0x60, 0xb4, 0x7b, 0x44, 0x2e, 0x43, 0x25, 0x8a, 0xf9, 0xb1, 0xc4, 0x4b, 0x88, - 0x97, 0xa5, 0xb8, 0x7b, 0x24, 0xdd, 0x7a, 0x9e, 0x26, 0x8c, 0xbb, 0x26, 0xa6, 0x55, 0x09, 0xde, - 0x6f, 0x05, 0xa8, 0xe8, 0x71, 0x21, 0x37, 0xf5, 0x28, 0x19, 0x98, 0x01, 0x67, 0x21, 0x03, 0xb3, - 0x71, 0xba, 0x0b, 0xd6, 0x88, 0x89, 0x20, 0x0a, 0x44, 0x80, 0x15, 0xaa, 0x6e, 0x35, 0xe6, 0x87, - 0x6e, 0x63, 0x4f, 0x2b, 0x55, 0xbe, 0xa6, 0xb6, 0xe4, 0x2a, 0x00, 0x17, 0x41, 0x26, 0xd4, 0x0c, - 0xaa, 0x0a, 0xda, 0x88, 0xc8, 0x01, 0x24, 0xff, 0x05, 0x8b, 0x25, 0x91, 0x52, 0xaa, 0x7a, 0x55, - 0x58, 0x12, 0xa1, 0xea, 0xf6, 0x6c, 0x4f, 0x99, 0x78, 0x21, 0x99, 0xdb, 0x53, 0xb2, 0xc3, 0xa4, - 0x73, 0xd3, 0x75, 0x75, 0x0d, 0xaa, 0xfc, 0x94, 0x0b, 0x36, 0xea, 0x63, 0x30, 0x65, 0x8c, 0x16, - 0x14, 0xd4, 0x49, 0x07, 0xbc, 0xf1, 0x21, 0xd4, 0x16, 0x7c, 0x7c, 0xa3, 0x12, 0xfe, 0x6c, 0x40, - 0x75, 0x2e, 0x27, 0x67, 0xa2, 0x2a, 0xbc, 0x2e, 0xaa, 0xe2, 0x62, 0x54, 0x6f, 0xda, 0x9e, 0x57, - 0xe4, 0x62, 0x8d, 0x45, 0x3f, 0x4c, 0x23, 0x86, 0x8d, 0x6e, 0x52, 0x4b, 0x02, 0xad, 0x34, 0x62, - 0x5e, 0x0f, 0x6a, 0x0b, 0xe9, 0xc8, 0x47, 0xd6, 0x38, 0x3f, 0xb2, 0x85, 0xb9, 0x91, 0x95, 0xde, - 0xc7, 0xcf, 0x59, 0xff, 0xe8, 0x54, 0x30, 0x8e, 0x0e, 0x16, 0xa9, 0x2d, 0x91, 0xfb, 0x12, 0xf0, - 0x6e, 0x02, 0x69, 0xc9, 0x25, 0xc9, 0x64, 0x6d, 0x29, 0xe3, 0xe3, 0x34, 0xe1, 0xec, 0xec, 0x13, - 0xe6, 0xb5, 0xa0, 0xbe, 0xcb, 0x84, 0x32, 0xf9, 0x6a, 0xc2, 0xb8, 0x38, 0xf7, 0xc8, 0x5d, 0x87, - 0xd2, 0x49, 0xcc, 0x9e, 0xea, 0x37, 0xae, 0x36, 0x6d, 0x97, 0x8f, 0x63, 0xf6, 0x94, 0xa2, 0xca, - 0xfb, 0xb6, 0x00, 0x4e, 0x27, 0xe6, 0x48, 0xc3, 0x73, 0x9e, 0x2b, 0x60, 0x8f, 0x83, 0x01, 0xeb, - 0x4b, 0x8f, 0xd0, 0xbb, 0x1a, 0xb5, 0x24, 0x70, 0x10, 0x3f, 0x67, 0xd2, 0x77, 0x54, 0x8a, 0xf4, - 0x98, 0x25, 0x3a, 0x87, 0x68, 0xde, 0x93, 0xc0, 0xf4, 0x4e, 0xf3, 0x95, 0x77, 0xce, 0xde, 0xde, - 0xf2, 0xab, 0xde, 0xde, 0x3b, 0xfa, 0x15, 0x52, 0xcf, 0xe3, 0x35, 0x34, 0x38, 0xeb, 0xe5, 0xd9, - 0x17, 0xe9, 0x9f, 0x3f, 0x25, 0x4f, 0x60, 0x79, 0x8e, 0x5c, 0x67, 0xfb, 0x1a, 0x98, 0x42, 0x02, - 0x7a, 0x2a, 0xed, 0x69, 0x20, 0x54, 0xe1, 0xe4, 0x2d, 0xb8, 0x98, 0xb0, 0x67, 0xa2, 0x3f, 0x97, - 0x0c, 0xc5, 0x5c, 0x93, 0xf0, 0xc3, 0x3c, 0x21, 0xde, 0x0d, 0x58, 0x6e, 0x05, 0x49, 0xc8, 0x86, - 0xaf, 0xa9, 0x94, 0xb7, 0x02, 0x64, 0xde, 0x48, 0xf9, 0x20, 0xd1, 0x03, 0x96, 0x9d, 0xc4, 0x21, - 0x6b, 0x27, 0x5f, 0xa4, 0xfa, 0xac, 0xf7, 0xc2, 0x80, 0xea, 0x1c, 0xfc, 0xd2, 0xb7, 0xc5, 0x81, - 0x62, 0x94, 0x86, 0xda, 0x21, 0xf9, 0x29, 0xb7, 0x38, 0x17, 0x69, 0x26, 0xf7, 0x7e, 0x51, 0xed, - 0x77, 0x2d, 0x92, 0x47, 0xb0, 0x2c, 0x23, 0xea, 0x63, 0xea, 0xfb, 0x61, 0x3a, 0x49, 0x04, 0x77, - 0x4b, 0x18, 0xf5, 0x2d, 0x55, 0x9a, 0xd9, 0x65, 0x98, 0x01, 0x2c, 0x55, 0x0b, 0xed, 0x54, 0xfe, - 0x2f, 0x8a, 0x45, 0xb4, 0x71, 0x1f, 0x56, 0x5e, 0x66, 0xf8, 0x77, 0x55, 0x31, 0xe7, 0xaa, 0xb2, - 0x7e, 0x03, 0xac, 0xfc, 0x15, 0x23, 0x16, 0x94, 0x1e, 0xb4, 0x3b, 0xbe, 0x73, 0x81, 0xd4, 0xc0, - 0xde, 0x69, 0x53, 0xbf, 0xd5, 0xdb, 0xa7, 0x8f, 0x1d, 0x63, 0xfd, 0x07, 0x03, 0x4c, 0xbc, 0x85, - 0x54, 0xa1, 0x72, 0xd8, 0xfd, 0xa8, 0xbb, 0xff, 0x49, 0xd7, 0xb9, 0x40, 0x00, 0xca, 0x8f, 0x0e, - 0xfd, 0x43, 0x7f, 0xc7, 0x31, 0x88, 0x03, 0x4b, 0xed, 0x6e, 0xbb, 0xd7, 0xde, 0xee, 0xb4, 0x3f, - 0x6b, 0x77, 0x77, 0x9d, 0x82, 0x34, 0xa5, 0x87, 0xdd, 0xae, 0x14, 0x8a, 0xd2, 0xf4, 0xe1, 0xf6, - 0xe1, 0x81, 0xbf, 0xe3, 0x94, 0xc8, 0x12, 0x58, 0xad, 0xfd, 0xbd, 0x87, 0x1d, 0xbf, 0xe7, 0x3b, - 0x26, 0x21, 0x50, 0xf7, 0x3f, 0xf5, 0x5b, 0x87, 0xbd, 0x7d, 0xda, 0xf7, 0x29, 0xdd, 0xa7, 0x4e, - 0x59, 0x92, 0x1d, 0x3c, 0x3e, 0xe8, 0xf9, 0x7b, 0x1a, 0xa9, 0xe0, 0x99, 0xed, 0x6e, 0xcb, 0xef, - 0xf8, 0x3b, 0x8e, 0xb5, 0x7e, 0x1b, 0xac, 0xbc, 0xd9, 0xe5, 0x35, 0x7b, 0xed, 0x6e, 0x7b, 0x6f, - 0xbb, 0xe3, 0x5c, 0x20, 0x36, 0x98, 0xf7, 0xb7, 0x0f, 0xda, 0x2d, 0xc7, 0xc0, 0x60, 0x0e, 0x3b, - 0x1d, 0xa7, 0xb0, 0xf5, 0x6b, 0x11, 0xaa, 0x98, 0x27, 0x95, 0x60, 0xf2, 0x39, 0x4e, 0xf4, 0x7c, - 0x6d, 0x2f, 0x9f, 0x2d, 0x80, 0x6e, 0x82, 0x86, 0x73, 0x56, 0xe1, 0xfd, 0xff, 0xbb, 0xdf, 0x5f, - 0xfc, 0x54, 0x70, 0xc9, 0xea, 0xe6, 0xc9, 0x7b, 0x9b, 0xd8, 0xa2, 0x9b, 0x5c, 0xa9, 0xdf, 0x8d, - 0x25, 0xd5, 0x03, 0x80, 0xd9, 0x52, 0x21, 0xb3, 0x7e, 0x6e, 0xa8, 0x3b, 0xce, 0x2f, 0x1c, 0x6f, - 0x05, 0x19, 0xeb, 0x9e, 0x3d, 0x65, 0xbc, 0x67, 0xac, 0x93, 0x3d, 0xb0, 0xa7, 0xd3, 0x42, 0x2e, - 0xbd, 0x74, 0x34, 0x1b, 0xab, 0x67, 0x61, 0xcd, 0xb8, 0x8c, 0x8c, 0x55, 0x32, 0x63, 0x24, 0xdb, - 0x50, 0xd1, 0x5b, 0x8c, 0xa8, 0x5f, 0x9b, 0x8b, 0x3b, 0xad, 0x31, 0x73, 0xd4, 0x5b, 0xc5, 0xd3, - 0x0e, 0xa9, 0xcf, 0x22, 0xfc, 0x3a, 0x8e, 0xbe, 0x21, 0x4f, 0x00, 0x66, 0xc3, 0x43, 0xd4, 0xdd, - 0xe7, 0x46, 0x2e, 0x0f, 0xf3, 0xfc, 0x94, 0x5d, 0x45, 0xda, 0xcb, 0xde, 0xa5, 0x45, 0xda, 0x7b, - 0x21, 0x9a, 0x1e, 0x95, 0xf1, 0x9f, 0xc4, 0x9d, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xca, - 0x2c, 0x8f, 0x79, 0x0c, 0x00, 0x00, + GoTypes: file_tes_tes_proto_goTypes, + DependencyIndexes: file_tes_tes_proto_depIdxs, + EnumInfos: file_tes_tes_proto_enumTypes, + MessageInfos: file_tes_tes_proto_msgTypes, + }.Build() + File_tes_tes_proto = out.File + file_tes_tes_proto_rawDesc = nil + file_tes_tes_proto_goTypes = nil + file_tes_tes_proto_depIdxs = nil } diff --git a/tes/tes.pb.gw.go b/tes/tes.pb.gw.go index 83d4a1f0..c39d24e5 100644 --- a/tes/tes.pb.gw.go +++ b/tes/tes.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: tes.proto +// source: tes/tes.proto /* Package tes is a reverse proxy. @@ -9,43 +9,50 @@ It translates gRPC into RESTful JSON APIs. package tes import ( + "context" "io" "net/http" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "golang.org/x/net/context" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = metadata.Join -func request_TaskService_GetServiceInfo_0(ctx context.Context, marshaler runtime.Marshaler, client TaskServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ServiceInfoRequest +func request_TaskService_CreateTask_0(ctx context.Context, marshaler runtime.Marshaler, client TaskServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq Task var metadata runtime.ServerMetadata - msg, err := client.GetServiceInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateTask(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func request_TaskService_CreateTask_0(ctx context.Context, marshaler runtime.Marshaler, client TaskServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_TaskService_CreateTask_0(ctx context.Context, marshaler runtime.Marshaler, server TaskServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq Task var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreateTask(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := server.CreateTask(ctx, &protoReq) return msg, metadata, err } @@ -58,7 +65,10 @@ func request_TaskService_ListTasks_0(ctx context.Context, marshaler runtime.Mars var protoReq ListTasksRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_TaskService_ListTasks_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TaskService_ListTasks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -67,6 +77,22 @@ func request_TaskService_ListTasks_0(ctx context.Context, marshaler runtime.Mars } +func local_request_TaskService_ListTasks_0(ctx context.Context, marshaler runtime.Marshaler, server TaskServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListTasksRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TaskService_ListTasks_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListTasks(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_TaskService_GetTask_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -88,12 +114,14 @@ func request_TaskService_GetTask_0(ctx context.Context, marshaler runtime.Marsha } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_TaskService_GetTask_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TaskService_GetTask_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -102,6 +130,39 @@ func request_TaskService_GetTask_0(ctx context.Context, marshaler runtime.Marsha } +func local_request_TaskService_GetTask_0(ctx context.Context, marshaler runtime.Marshaler, server TaskServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTaskRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TaskService_GetTask_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTask(ctx, &protoReq) + return msg, metadata, err + +} + func request_TaskService_CancelTask_0(ctx context.Context, marshaler runtime.Marshaler, client TaskServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CancelTaskRequest var metadata runtime.ServerMetadata @@ -119,7 +180,6 @@ func request_TaskService_CancelTask_0(ctx context.Context, marshaler runtime.Mar } protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -129,24 +189,202 @@ func request_TaskService_CancelTask_0(ctx context.Context, marshaler runtime.Mar } +func local_request_TaskService_CancelTask_0(ctx context.Context, marshaler runtime.Marshaler, server TaskServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CancelTaskRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.CancelTask(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TaskService_GetServiceInfo_0(ctx context.Context, marshaler runtime.Marshaler, client TaskServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ServiceInfoRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetServiceInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TaskService_GetServiceInfo_0(ctx context.Context, marshaler runtime.Marshaler, server TaskServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ServiceInfoRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetServiceInfo(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterTaskServiceHandlerServer registers the http handlers for service TaskService to "mux". +// UnaryRPC :call TaskServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTaskServiceHandlerFromEndpoint instead. +func RegisterTaskServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TaskServiceServer) error { + + mux.Handle("POST", pattern_TaskService_CreateTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tes.TaskService/CreateTask", runtime.WithHTTPPathPattern("/v1/tasks")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TaskService_CreateTask_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TaskService_CreateTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TaskService_ListTasks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tes.TaskService/ListTasks", runtime.WithHTTPPathPattern("/v1/tasks")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TaskService_ListTasks_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TaskService_ListTasks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TaskService_GetTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tes.TaskService/GetTask", runtime.WithHTTPPathPattern("/v1/tasks/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TaskService_GetTask_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TaskService_GetTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TaskService_CancelTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tes.TaskService/CancelTask", runtime.WithHTTPPathPattern("/v1/tasks/{id}:cancel")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TaskService_CancelTask_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TaskService_CancelTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TaskService_GetServiceInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/tes.TaskService/GetServiceInfo", runtime.WithHTTPPathPattern("/v1/tasks/service-info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TaskService_GetServiceInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TaskService_GetServiceInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + // RegisterTaskServiceHandlerFromEndpoint is same as RegisterTaskServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterTaskServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -157,150 +395,123 @@ func RegisterTaskServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Se // RegisterTaskServiceHandler registers the http handlers for service TaskService to "mux". // The handlers forward requests to the grpc endpoint over "conn". func RegisterTaskServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - client := NewTaskServiceClient(conn) + return RegisterTaskServiceHandlerClient(ctx, mux, NewTaskServiceClient(conn)) +} - mux.Handle("GET", pattern_TaskService_GetServiceInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(ctx) +// RegisterTaskServiceHandlerClient registers the http handlers for service TaskService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TaskServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TaskServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "TaskServiceClient" to call the correct interceptors. +func RegisterTaskServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TaskServiceClient) error { + + mux.Handle("POST", pattern_TaskService_CreateTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tes.TaskService/CreateTask", runtime.WithHTTPPathPattern("/v1/tasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_TaskService_GetServiceInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_TaskService_CreateTask_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TaskService_GetServiceInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_TaskService_CreateTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_TaskService_CreateTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(ctx) + mux.Handle("GET", pattern_TaskService_ListTasks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tes.TaskService/ListTasks", runtime.WithHTTPPathPattern("/v1/tasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_TaskService_CreateTask_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_TaskService_ListTasks_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TaskService_CreateTask_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_TaskService_ListTasks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_TaskService_ListTasks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(ctx) + mux.Handle("GET", pattern_TaskService_GetTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tes.TaskService/GetTask", runtime.WithHTTPPathPattern("/v1/tasks/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_TaskService_ListTasks_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_TaskService_GetTask_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TaskService_ListTasks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_TaskService_GetTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_TaskService_GetTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(ctx) + mux.Handle("POST", pattern_TaskService_CancelTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tes.TaskService/CancelTask", runtime.WithHTTPPathPattern("/v1/tasks/{id}:cancel")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_TaskService_GetTask_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_TaskService_CancelTask_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TaskService_GetTask_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_TaskService_CancelTask_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_TaskService_CancelTask_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(ctx) + mux.Handle("GET", pattern_TaskService_GetServiceInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/tes.TaskService/GetServiceInfo", runtime.WithHTTPPathPattern("/v1/tasks/service-info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_TaskService_CancelTask_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_TaskService_GetServiceInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_TaskService_CancelTask_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_TaskService_GetServiceInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -308,8 +519,6 @@ func RegisterTaskServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn } var ( - pattern_TaskService_GetServiceInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "tasks", "service-info"}, "")) - pattern_TaskService_CreateTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "tasks"}, "")) pattern_TaskService_ListTasks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "tasks"}, "")) @@ -317,11 +526,11 @@ var ( pattern_TaskService_GetTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "tasks", "id"}, "")) pattern_TaskService_CancelTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "tasks", "id"}, "cancel")) + + pattern_TaskService_GetServiceInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "tasks", "service-info"}, "")) ) var ( - forward_TaskService_GetServiceInfo_0 = runtime.ForwardResponseMessage - forward_TaskService_CreateTask_0 = runtime.ForwardResponseMessage forward_TaskService_ListTasks_0 = runtime.ForwardResponseMessage @@ -329,4 +538,6 @@ var ( forward_TaskService_GetTask_0 = runtime.ForwardResponseMessage forward_TaskService_CancelTask_0 = runtime.ForwardResponseMessage + + forward_TaskService_GetServiceInfo_0 = runtime.ForwardResponseMessage ) diff --git a/tes/tes.proto b/tes/tes.proto index 1b7453bc..2e2359cf 100644 --- a/tes/tes.proto +++ b/tes/tes.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package tes; +option go_package = "github.com/ohsu-comp-bio/funnel/tes"; + // Import HTTP RESTful annotations. import "google/api/annotations.proto"; @@ -116,7 +118,7 @@ message Input { // OPTIONAL // - // File content literal. + // File content literal. // Implementations should support a minimum of 128 KiB in this field and may define its own maximum. // UTF-8 encoded // @@ -262,7 +264,7 @@ message TaskLog { // Information about all output files. Directory outputs are // flattened into separate items. repeated OutputFileLog outputs = 5; - + // OPTIONAL // // System logs are any logs the system decides are relevant, @@ -452,7 +454,7 @@ message ListTasksRequest { State state = 6; // OPTIONAL - // + // // Filter tasks based on the Task.tags field. // A tag filter matches a Task tag if both the key and value are exact matches. // @@ -540,7 +542,7 @@ message ServiceInfo { // Lists some, but not necessarily all, storage locations supported by the service. // // Must be in a valid URL format. - // e.g. + // e.g. // file:///path/to/local/funnel-storage // s3://ohsu-compbio-funnel/storage // etc. @@ -553,15 +555,6 @@ message ServiceInfo { // services to create, list, get, update tasks. service TaskService { - // GetServiceInfo provides information about the service, - // such as storage details, resource availability, and - // other documentation. - rpc GetServiceInfo(ServiceInfoRequest) returns (ServiceInfo) { - option (google.api.http) = { - get: "/v1/tasks/service-info" - }; - } - // Create a new task. rpc CreateTask(Task) returns (CreateTaskResponse) { option (google.api.http) = { @@ -596,4 +589,13 @@ service TaskService { }; } + // GetServiceInfo provides information about the service, + // such as storage details, resource availability, and + // other documentation. + rpc GetServiceInfo(ServiceInfoRequest) returns (ServiceInfo) { + option (google.api.http) = { + get: "/v1/tasks/service-info" + }; + } + } diff --git a/tes/tes_grpc.pb.go b/tes/tes_grpc.pb.go new file mode 100644 index 00000000..8f03eb91 --- /dev/null +++ b/tes/tes_grpc.pb.go @@ -0,0 +1,279 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.3 +// source: tes/tes.proto + +package tes + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TaskService_CreateTask_FullMethodName = "/tes.TaskService/CreateTask" + TaskService_ListTasks_FullMethodName = "/tes.TaskService/ListTasks" + TaskService_GetTask_FullMethodName = "/tes.TaskService/GetTask" + TaskService_CancelTask_FullMethodName = "/tes.TaskService/CancelTask" + TaskService_GetServiceInfo_FullMethodName = "/tes.TaskService/GetServiceInfo" +) + +// TaskServiceClient is the client API for TaskService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TaskServiceClient interface { + // Create a new task. + CreateTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*CreateTaskResponse, error) + // List tasks. + // TaskView is requested as such: "v1/tasks?view=BASIC" + // Filter examples: + // "v1/tasks?view=MINIMAL&tags[workflowID]=e59fb57a-eb87-4c02-b7e2-562b586b5db3" + // "v1/tasks?state=RUNNING" + ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) + // Get a task. + // TaskView is requested as such: "v1/tasks/{id}?view=FULL" + GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) + // Cancel a task. + CancelTask(ctx context.Context, in *CancelTaskRequest, opts ...grpc.CallOption) (*CancelTaskResponse, error) + // GetServiceInfo provides information about the service, + // such as storage details, resource availability, and + // other documentation. + GetServiceInfo(ctx context.Context, in *ServiceInfoRequest, opts ...grpc.CallOption) (*ServiceInfo, error) +} + +type taskServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient { + return &taskServiceClient{cc} +} + +func (c *taskServiceClient) CreateTask(ctx context.Context, in *Task, opts ...grpc.CallOption) (*CreateTaskResponse, error) { + out := new(CreateTaskResponse) + err := c.cc.Invoke(ctx, TaskService_CreateTask_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { + out := new(ListTasksResponse) + err := c.cc.Invoke(ctx, TaskService_ListTasks_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, TaskService_GetTask_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) CancelTask(ctx context.Context, in *CancelTaskRequest, opts ...grpc.CallOption) (*CancelTaskResponse, error) { + out := new(CancelTaskResponse) + err := c.cc.Invoke(ctx, TaskService_CancelTask_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) GetServiceInfo(ctx context.Context, in *ServiceInfoRequest, opts ...grpc.CallOption) (*ServiceInfo, error) { + out := new(ServiceInfo) + err := c.cc.Invoke(ctx, TaskService_GetServiceInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TaskServiceServer is the server API for TaskService service. +// All implementations should embed UnimplementedTaskServiceServer +// for forward compatibility +type TaskServiceServer interface { + // Create a new task. + CreateTask(context.Context, *Task) (*CreateTaskResponse, error) + // List tasks. + // TaskView is requested as such: "v1/tasks?view=BASIC" + // Filter examples: + // "v1/tasks?view=MINIMAL&tags[workflowID]=e59fb57a-eb87-4c02-b7e2-562b586b5db3" + // "v1/tasks?state=RUNNING" + ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) + // Get a task. + // TaskView is requested as such: "v1/tasks/{id}?view=FULL" + GetTask(context.Context, *GetTaskRequest) (*Task, error) + // Cancel a task. + CancelTask(context.Context, *CancelTaskRequest) (*CancelTaskResponse, error) + // GetServiceInfo provides information about the service, + // such as storage details, resource availability, and + // other documentation. + GetServiceInfo(context.Context, *ServiceInfoRequest) (*ServiceInfo, error) +} + +// UnimplementedTaskServiceServer should be embedded to have forward compatible implementations. +type UnimplementedTaskServiceServer struct { +} + +func (UnimplementedTaskServiceServer) CreateTask(context.Context, *Task) (*CreateTaskResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented") +} +func (UnimplementedTaskServiceServer) ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTasks not implemented") +} +func (UnimplementedTaskServiceServer) GetTask(context.Context, *GetTaskRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTask not implemented") +} +func (UnimplementedTaskServiceServer) CancelTask(context.Context, *CancelTaskRequest) (*CancelTaskResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelTask not implemented") +} +func (UnimplementedTaskServiceServer) GetServiceInfo(context.Context, *ServiceInfoRequest) (*ServiceInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetServiceInfo not implemented") +} + +// UnsafeTaskServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TaskServiceServer will +// result in compilation errors. +type UnsafeTaskServiceServer interface { + mustEmbedUnimplementedTaskServiceServer() +} + +func RegisterTaskServiceServer(s grpc.ServiceRegistrar, srv TaskServiceServer) { + s.RegisterService(&TaskService_ServiceDesc, srv) +} + +func _TaskService_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Task) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).CreateTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_CreateTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).CreateTask(ctx, req.(*Task)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).ListTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_ListTasks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).ListTasks(ctx, req.(*ListTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).GetTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_GetTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).GetTask(ctx, req.(*GetTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_CancelTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).CancelTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_CancelTask_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).CancelTask(ctx, req.(*CancelTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_GetServiceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServiceInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).GetServiceInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_GetServiceInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).GetServiceInfo(ctx, req.(*ServiceInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TaskService_ServiceDesc is the grpc.ServiceDesc for TaskService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TaskService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tes.TaskService", + HandlerType: (*TaskServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateTask", + Handler: _TaskService_CreateTask_Handler, + }, + { + MethodName: "ListTasks", + Handler: _TaskService_ListTasks_Handler, + }, + { + MethodName: "GetTask", + Handler: _TaskService_GetTask_Handler, + }, + { + MethodName: "CancelTask", + Handler: _TaskService_CancelTask_Handler, + }, + { + MethodName: "GetServiceInfo", + Handler: _TaskService_GetServiceInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tes/tes.proto", +} diff --git a/tes/utils.go b/tes/utils.go index 945fa488..d6be4459 100644 --- a/tes/utils.go +++ b/tes/utils.go @@ -1,33 +1,35 @@ package tes import ( - "bytes" "encoding/base64" "errors" "fmt" "time" "github.com/getlantern/deepcopy" - "github.com/golang/protobuf/jsonpb" "github.com/rs/xid" + "google.golang.org/protobuf/encoding/protojson" ) // Marshaler marshals tasks to indented JSON. -var Marshaler = jsonpb.Marshaler{ - Indent: " ", +var Marshaler = protojson.MarshalOptions{ + Indent: " ", + Multiline: false, + UseProtoNames: true, } +var Unmarshaler = protojson.UnmarshalOptions{} // MarshalToString marshals a task to an indented JSON string. func MarshalToString(t *Task) (string, error) { if t == nil { return "", fmt.Errorf("can't marshal nil task") } - return Marshaler.MarshalToString(t) + return Marshaler.Format(t), nil } // Base64Encode encodes a task as a base64 encoded string func Base64Encode(t *Task) (string, error) { - str, err := Marshaler.MarshalToString(t) + str, err := MarshalToString(t) if err != nil { return "", err } @@ -42,8 +44,7 @@ func Base64Decode(raw string) (*Task, error) { return nil, fmt.Errorf("decoding task: %v", err) } task := &Task{} - buf := bytes.NewBuffer(data) - err = jsonpb.Unmarshal(buf, task) + err = protojson.Unmarshal(data, task) if err != nil { return nil, fmt.Errorf("unmarshaling task: %v", err) } @@ -107,7 +108,9 @@ func TerminalState(s State) bool { // GetBasicView returns the basic view of a task. func (task *Task) GetBasicView() *Task { view := &Task{} - deepcopy.Copy(view, task) + if err := deepcopy.Copy(view, task); err != nil { + fmt.Printf("Error detected while copying task data: %v", err) + } // remove contents from inputs for _, v := range view.Inputs { diff --git a/tes/utils_test.go b/tes/utils_test.go index 3f2d7e15..c3381d3d 100644 --- a/tes/utils_test.go +++ b/tes/utils_test.go @@ -16,16 +16,23 @@ func TestBase64Encode(t *testing.T) { }, } - expected := "ewogICJpZCI6ICJ0YXNrMSIsCiAgImV4ZWN1dG9ycyI6IFsKICAgIHsKICAgICAgImltYWdlIjogImFscGluZSIsCiAgICAgICJjb21tYW5kIjogWwogICAgICAgICJlY2hvIiwKICAgICAgICAiaGVsbG8gd29ybGQiCiAgICAgIF0KICAgIH0KICBdCn0=" + // Protojson may (and may not) add extra whitespace between labels and values. + // Therefore there are two possible scenarios when the test checks against specific BASE64 value(s). + // More info: https://github.com/golang/protobuf/issues/1082 + expected1 := "ewogICJpZCI6ICJ0YXNrMSIsCiAgImV4ZWN1dG9ycyI6IFsKICAgIHsKICAgICAgImltYWdlIjogImFscGluZSIsCiAgICAgICJjb21tYW5kIjogWwogICAgICAgICJlY2hvIiwKICAgICAgICAiaGVsbG8gd29ybGQiCiAgICAgIF0KICAgIH0KICBdCn0=" + expected2 := "ewogICJpZCI6ICAidGFzazEiLAogICJleGVjdXRvcnMiOiAgWwogICAgewogICAgICAiaW1hZ2UiOiAgImFscGluZSIsCiAgICAgICJjb21tYW5kIjogIFsKICAgICAgICAiZWNobyIsCiAgICAgICAgImhlbGxvIHdvcmxkIgogICAgICBdCiAgICB9CiAgXQp9" encoded, err := Base64Encode(task) if err != nil { t.Fatal(err) } - if encoded != expected { - t.Logf("expected: %+v", expected) - t.Logf("actual: %+v", encoded) + if encoded != expected1 && encoded != expected2 { + str, err := MarshalToString(task) + t.Logf("Source JSON-string: %+v (error: %+v)", str, err) + t.Logf("actual: %+v", encoded) + t.Logf("expected1: %+v", expected1) + t.Logf("expected2: %+v", expected2) t.Fatal("unexpected value returned from Base64Encode") } diff --git a/tests/cmd/task_create_test.go b/tests/cmd/task_create_test.go index 147afe94..369e7536 100644 --- a/tests/cmd/task_create_test.go +++ b/tests/cmd/task_create_test.go @@ -2,7 +2,7 @@ package cmd import ( "bytes" - "io/ioutil" + "os" "strings" "testing" @@ -17,8 +17,8 @@ func TestCreateStdin(t *testing.T) { fun := tests.NewFunnel(conf) fun.StartServer() - a, _ := ioutil.ReadFile("hello-world.json") - b, _ := ioutil.ReadFile("hello-world.json") + a, _ := os.ReadFile("hello-world.json") + b, _ := os.ReadFile("hello-world.json") in := &bytes.Buffer{} out := &bytes.Buffer{} @@ -30,8 +30,9 @@ func TestCreateStdin(t *testing.T) { t.Fatal(err) } - ids := strings.Split(strings.TrimSpace(out.String()), "\n") + outStr := out.String() + ids := strings.Split(strings.TrimSpace(outStr), "\n") if len(ids) != 3 { - t.Fatal("err", ids) + t.Fatalf("Expected 3, got %d task ID value(s) from stdout buffer %q", len(ids), outStr) } } diff --git a/tests/config_utils.go b/tests/config_utils.go index f90575c2..b8d40a75 100644 --- a/tests/config_utils.go +++ b/tests/config_utils.go @@ -5,7 +5,6 @@ import ( "flag" "fmt" "io" - "io/ioutil" "math/rand" "os" "path" @@ -70,7 +69,7 @@ func TestifyConfig(conf config.Config) config.Config { conf.PBS.ReconcileRate = reconcile conf.AWSBatch.ReconcileRate = reconcile - storageDir, _ := ioutil.TempDir("./test_tmp", "funnel-test-storage-") + storageDir, _ := os.MkdirTemp("./test_tmp", "funnel-test-storage-") wd, _ := os.Getwd() fsutil.EnsureDir(storageDir) @@ -91,6 +90,7 @@ func RandomPort() string { // RandomPortConfig returns a modified config with random HTTP and RPC ports. func RandomPortConfig(conf config.Config) config.Config { + conf.Server.HostName = "localhost" conf.Server.RPCPort = RandomPort() conf.Server.HTTPPort = RandomPort() conf.RPCClient.ServerAddress = conf.Server.RPCAddress() @@ -100,7 +100,7 @@ func RandomPortConfig(conf config.Config) config.Config { // TempDirConfig returns a modified config with workdir and db path set to a temp. directory. func TempDirConfig(conf config.Config) config.Config { os.Mkdir("./test_tmp", os.ModePerm) - f, _ := ioutil.TempDir("./test_tmp", "funnel-test-") + f, _ := os.MkdirTemp("./test_tmp", "funnel-test-") conf.Worker.WorkDir = f conf.BoltDB.Path = path.Join(f, "funnel.db") conf.Badger.Path = path.Join(f, "funnel.badger.db") diff --git a/tests/funnel_utils.go b/tests/funnel_utils.go index fe3a9e1f..381f5c84 100644 --- a/tests/funnel_utils.go +++ b/tests/funnel_utils.go @@ -3,7 +3,6 @@ package tests import ( "bytes" "fmt" - "io/ioutil" "net/http" "os" "os/exec" @@ -300,14 +299,14 @@ func (f *Funnel) WaitForExec(id string, i int) { // Tempdir returns a new temporary directory path func (f *Funnel) Tempdir() string { - d, _ := ioutil.TempDir(f.StorageDir, "") + d, _ := os.MkdirTemp(f.StorageDir, "") d, _ = filepath.Abs(d) return d } // WriteFile writes a file to the local (temporary) storage directory. func (f *Funnel) WriteFile(name string, content string) { - err := ioutil.WriteFile(f.StorageDir+"/"+name, []byte(content), os.ModePerm) + err := os.WriteFile(f.StorageDir+"/"+name, []byte(content), os.ModePerm) if err != nil { panic(err) } @@ -315,7 +314,7 @@ func (f *Funnel) WriteFile(name string, content string) { // ReadFile reads a file to the local (temporary) storage directory. func (f *Funnel) ReadFile(name string) string { - b, err := ioutil.ReadFile(f.StorageDir + "/" + name) + b, err := os.ReadFile(f.StorageDir + "/" + name) if err != nil { panic(err) } @@ -410,7 +409,7 @@ func (f *Funnel) StartServerInDocker(containerName, imageName string, extraArgs func (f *Funnel) findTestServerContainers() []string { res := []string{} - containers, err := f.Docker.ContainerList(context.Background(), dockerTypes.ContainerListOptions{}) + containers, err := f.Docker.ContainerList(context.Background(), container.ListOptions{}) if err != nil { panic(err) } diff --git a/tests/server/webdash_test.go b/tests/server/webdash_test.go index 7e0e4d10..1f2838ee 100644 --- a/tests/server/webdash_test.go +++ b/tests/server/webdash_test.go @@ -1,7 +1,7 @@ package server import ( - "io/ioutil" + "io" "net/http" "testing" "time" @@ -21,7 +21,7 @@ func TestWebdash(t *testing.T) { // Get the response body defer resp.Body.Close() - b, berr := ioutil.ReadAll(resp.Body) + b, berr := io.ReadAll(resp.Body) if berr != nil { t.Fatal(berr) } diff --git a/tests/storage/amazon_s3_test.go b/tests/storage/amazon_s3_test.go index 4de5da0a..2b3251b6 100644 --- a/tests/storage/amazon_s3_test.go +++ b/tests/storage/amazon_s3_test.go @@ -2,7 +2,6 @@ package storage import ( "context" - "io/ioutil" "os" "strings" "testing" @@ -135,7 +134,7 @@ func TestAmazonS3Storage(t *testing.T) { t.Fatal("Failed to download file:", err) } - b, err := ioutil.ReadFile("./test_tmp/test-s3-file.txt") + b, err := os.ReadFile("./test_tmp/test-s3-file.txt") if err != nil { t.Fatal("Failed to read downloaded file:", err) } @@ -154,7 +153,7 @@ func TestAmazonS3Storage(t *testing.T) { t.Fatal("Failed to download directory:", err) } - b, err = ioutil.ReadFile("./test_tmp/test-s3-directory/test-output-file.txt") + b, err = os.ReadFile("./test_tmp/test-s3-directory/test-output-file.txt") if err != nil { t.Fatal("Failed to read file in downloaded directory", err) } diff --git a/tests/storage/ftp_test.go b/tests/storage/ftp_test.go index 50c25cea..cb6ccf2e 100644 --- a/tests/storage/ftp_test.go +++ b/tests/storage/ftp_test.go @@ -2,7 +2,6 @@ package storage import ( "context" - "io/ioutil" "os" "strings" "testing" @@ -116,7 +115,7 @@ func TestFTPStorage(t *testing.T) { t.Fatal("Failed to download file:", err) } - b, err := ioutil.ReadFile("./test_tmp/test-gs-file.txt") + b, err := os.ReadFile("./test_tmp/test-gs-file.txt") if err != nil { t.Fatal("Failed to read downloaded file:", err) } @@ -135,7 +134,7 @@ func TestFTPStorage(t *testing.T) { t.Fatal("Failed to download directory:", err) } - b, err = ioutil.ReadFile("./test_tmp/test-gs-directory/test-output-file.txt") + b, err = os.ReadFile("./test_tmp/test-gs-directory/test-output-file.txt") if err != nil { t.Fatal("Failed to read file in downloaded directory", err) } @@ -306,7 +305,7 @@ func TestFTPStorageConfigAuth(t *testing.T) { t.Fatal("Failed to download file:", err) } - b, err := ioutil.ReadFile("./test_tmp/test-gs-file.txt") + b, err := os.ReadFile("./test_tmp/test-gs-file.txt") if err != nil { t.Fatal("Failed to read downloaded file:", err) } @@ -325,7 +324,7 @@ func TestFTPStorageConfigAuth(t *testing.T) { t.Fatal("Failed to download directory:", err) } - b, err = ioutil.ReadFile("./test_tmp/test-gs-directory/test-output-file.txt") + b, err = os.ReadFile("./test_tmp/test-gs-directory/test-output-file.txt") if err != nil { t.Fatal("Failed to read file in downloaded directory", err) } diff --git a/tests/storage/generic_s3_test.go b/tests/storage/generic_s3_test.go index 0c4d7a45..42b8d145 100644 --- a/tests/storage/generic_s3_test.go +++ b/tests/storage/generic_s3_test.go @@ -2,7 +2,6 @@ package storage import ( "context" - "io/ioutil" "os" "strings" "testing" @@ -132,7 +131,7 @@ func TestGenericS3Storage(t *testing.T) { t.Fatal("Failed to download file:", err) } - b, err := ioutil.ReadFile("./test_tmp/test-s3-file.txt") + b, err := os.ReadFile("./test_tmp/test-s3-file.txt") if err != nil { t.Fatal("Failed to read downloaded file:", err) } @@ -151,7 +150,7 @@ func TestGenericS3Storage(t *testing.T) { t.Fatal("Failed to download directory:", err) } - b, err = ioutil.ReadFile("./test_tmp/test-s3-directory/test-output-file.txt") + b, err = os.ReadFile("./test_tmp/test-s3-directory/test-output-file.txt") if err != nil { t.Fatal("Failed to read file in downloaded directory", err) } diff --git a/tests/storage/gs_test.go b/tests/storage/gs_test.go index bf14d122..0ee623cd 100644 --- a/tests/storage/gs_test.go +++ b/tests/storage/gs_test.go @@ -3,7 +3,6 @@ package storage import ( "context" "flag" - "io/ioutil" "os" "strings" "testing" @@ -139,7 +138,7 @@ func TestGoogleStorage(t *testing.T) { t.Fatal("Failed to download file:", err) } - b, err := ioutil.ReadFile("./test_tmp/test-gs-file.txt") + b, err := os.ReadFile("./test_tmp/test-gs-file.txt") if err != nil { t.Fatal("Failed to read downloaded file:", err) } @@ -158,7 +157,7 @@ func TestGoogleStorage(t *testing.T) { t.Fatal("Failed to download directory:", err) } - b, err = ioutil.ReadFile("./test_tmp/test-gs-directory/test-output-file.txt") + b, err = os.ReadFile("./test_tmp/test-gs-directory/test-output-file.txt") if err != nil { t.Fatal("Failed to read file in downloaded directory", err) } diff --git a/tests/storage/multi_s3_test.go b/tests/storage/multi_s3_test.go index 69af0892..70fdc428 100644 --- a/tests/storage/multi_s3_test.go +++ b/tests/storage/multi_s3_test.go @@ -2,7 +2,6 @@ package storage import ( "context" - "io/ioutil" "os" "strings" "testing" @@ -133,7 +132,7 @@ func TestMultiS3Storage(t *testing.T) { t.Fatal("Failed to download file:", err) } - b, err := ioutil.ReadFile("./test_tmp/test-s3-file.txt") + b, err := os.ReadFile("./test_tmp/test-s3-file.txt") if err != nil { t.Fatal("Failed to read downloaded file:", err) } diff --git a/tests/storage/swift_test.go b/tests/storage/swift_test.go index dabe3eb0..6d01a593 100644 --- a/tests/storage/swift_test.go +++ b/tests/storage/swift_test.go @@ -2,7 +2,6 @@ package storage import ( "context" - "io/ioutil" "os" "strings" "testing" @@ -127,7 +126,7 @@ func TestSwiftStorage(t *testing.T) { t.Fatal("Failed to download file:", err) } - b, err := ioutil.ReadFile("./test_tmp/test-s3-file.txt") + b, err := os.ReadFile("./test_tmp/test-s3-file.txt") if err != nil { t.Fatal("Failed to read downloaded file:", err) } @@ -146,7 +145,7 @@ func TestSwiftStorage(t *testing.T) { t.Fatal("Failed to download directory:", err) } - b, err = ioutil.ReadFile("./test_tmp/test-s3-directory/test-output-file.txt") + b, err = os.ReadFile("./test_tmp/test-s3-directory/test-output-file.txt") if err != nil { t.Fatal("Failed to read file in downloaded directory", err) } diff --git a/util/aws/session.go b/util/aws/session.go index 33f58c52..5ba8b689 100644 --- a/util/aws/session.go +++ b/util/aws/session.go @@ -19,7 +19,7 @@ func NewAWSSession(conf config.AWSConfig) (*session.Session, error) { } if conf.Endpoint != "" { - re := regexp.MustCompile("^s3.*\\.amazonaws\\.com/") + re := regexp.MustCompile(`^s3.*\.amazonaws\.com/`) if !re.MatchString(conf.Endpoint) && !strings.HasPrefix(conf.Endpoint, "https://") { awsConf.WithDisableSSL(true) } diff --git a/util/dockerutil/docker.go b/util/dockerutil/docker.go index 6f25c49d..64d8418f 100644 --- a/util/dockerutil/docker.go +++ b/util/dockerutil/docker.go @@ -2,9 +2,7 @@ package dockerutil import ( "context" - "errors" "os" - "regexp" "time" "github.com/docker/docker/client" @@ -13,7 +11,7 @@ import ( // NewDockerClient returns a new docker client. This util handles // working around some client/server API version mismatch issues. func NewDockerClient() (*client.Client, error) { - dclient, err := client.NewEnvClient() + dclient, err := client.NewClientWithOpts(client.FromEnv) if err != nil { return nil, err } @@ -24,19 +22,8 @@ func NewDockerClient() (*client.Client, error) { if os.Getenv("DOCKER_API_VERSION") == "" { ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) defer cancel() - - _, err := dclient.ServerVersion(ctx) - if err != nil { - re := regexp.MustCompile(`([0-9\.]+)`) - version := re.FindAllString(err.Error(), -1) - if version == nil { - return nil, errors.New("Can't connect docker client") - } - // Error message example: - // Error getting metadata for container: Error response from daemon: client is newer than server (client API version: 1.26, server API version: 1.24) - os.Setenv("DOCKER_API_VERSION", version[1]) - return NewDockerClient() - } + dclient.NegotiateAPIVersion(ctx) } + return dclient, nil } diff --git a/util/fsutil/io.go b/util/fsutil/io.go index 9bd01d15..45063a9f 100644 --- a/util/fsutil/io.go +++ b/util/fsutil/io.go @@ -2,6 +2,7 @@ package fsutil import ( "context" + "fmt" "io" "time" ) @@ -18,7 +19,9 @@ func Reader(ctx context.Context, r io.Reader) io.Reader { SetReadDeadline(time.Time) error } if d, ok := r.(deadliner); ok { - d.SetReadDeadline(deadline) + if err := d.SetReadDeadline(deadline); err != nil { + fmt.Printf("Detected error while setting deadline for io.Reader: %s\n", err) + } } } return reader{ctx, r} @@ -52,7 +55,9 @@ func Writer(ctx context.Context, w io.Writer) io.Writer { SetWriteDeadline(time.Time) error } if d, ok := w.(deadliner); ok { - d.SetWriteDeadline(deadline) + if err := d.SetWriteDeadline(deadline); err != nil { + fmt.Printf("Detected error while setting deadline for io.Writer: %s\n", err) + } } } return writer{ctx, w} diff --git a/util/http_utils.go b/util/http_utils.go index c6003a9a..56a8ad0f 100644 --- a/util/http_utils.go +++ b/util/http_utils.go @@ -2,7 +2,7 @@ package util import ( "fmt" - "io/ioutil" + "io" "net/http" ) @@ -14,7 +14,7 @@ func CheckHTTPResponse(resp *http.Response, err error) ([]byte, error) { } defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return nil, err } diff --git a/util/idle_timeout.go b/util/idle_timeout.go index 9c41d3b4..3ef06f94 100644 --- a/util/idle_timeout.go +++ b/util/idle_timeout.go @@ -6,18 +6,18 @@ import "time" // Start() and Stop() are used to control the timer, and Done() is used to // detect when the timeout has been reached. // -// in := make(chan int) -// requestInput(in) -// t := IdleTimeoutAfter(time.Second * 10) -// for { -// select { -// case <-t.Done(): -// // ... code to respond to timeout -// case <-in: -// // Reset the timeout. -// t.Start() -// } -// } +// in := make(chan int) +// requestInput(in) +// t := IdleTimeoutAfter(time.Second * 10) +// for { +// select { +// case <-t.Done(): +// // ... code to respond to timeout +// case <-in: +// // Reset the timeout. +// t.Start() +// } +// } type IdleTimeout interface { Done() <-chan time.Time Start() @@ -31,12 +31,8 @@ type noTimeout struct{} func (*noTimeout) Done() <-chan time.Time { return nil } -func (*noTimeout) Start() { - return -} -func (*noTimeout) Stop() { - return -} +func (*noTimeout) Start() {} +func (*noTimeout) Stop() {} // NoIdleTimeout creates an IdleTimeout that never times out. func NoIdleTimeout() IdleTimeout { @@ -51,13 +47,13 @@ type timerTimeout struct { // Done returns a channel which can be used to wait for the timeout. // -// t := IdleTimeoutAfter(time.Second * 10) -// for { -// select { -// case <-t.Done(): -// // ... code to respond to timeout -// } -// } +// t := IdleTimeoutAfter(time.Second * 10) +// for { +// select { +// case <-t.Done(): +// // ... code to respond to timeout +// } +// } func (t *timerTimeout) Done() <-chan time.Time { if t.timer != nil { return t.timer.C diff --git a/util/retry_test.go b/util/retry_test.go index 50fdbb53..167e86ad 100644 --- a/util/retry_test.go +++ b/util/retry_test.go @@ -20,21 +20,29 @@ func TestRetrier(t *testing.T) { bg := context.Background() i := 0 - r.Retry(bg, func() error { + err := r.Retry(bg, func() error { i++ return fmt.Errorf("always error") }) - if i != 3 { + + if err == nil { + t.Error("Retry did not report the error.") + } else if i != 3 { t.Error("unexpected number of retries", i) } + next := r.backoff.NextBackOff() if next != time.Millisecond*40 { t.Error("unexpected next backoff", next) } - r.Retry(bg, func() error { + err = r.Retry(bg, func() error { return nil }) + if err != nil { + t.Error("Retry reported unexpected error", err) + } + next = r.backoff.NextBackOff() if next != time.Millisecond*10 { t.Error("unexpected next backoff", next) diff --git a/util/ring/ring_test.go b/util/ring/ring_test.go index 225d9669..a1dba265 100644 --- a/util/ring/ring_test.go +++ b/util/ring/ring_test.go @@ -55,7 +55,9 @@ func TestBuffer_Reset(t *testing.T) { func TestBuffer_ResetNewBytes(t *testing.T) { buf := NewBuffer(4) - buf.Write([]byte("12345")) + if _, err := buf.Write([]byte("12345")); err != nil { + t.Error("Buffer write caused an unexpected error", err) + } if buf.NewBytesWritten() != 5 { t.Fatalf("expected new bytes written to be 5, got %d", buf.NewBytesWritten()) @@ -74,7 +76,10 @@ func TestBuffer_ResetNewBytes(t *testing.T) { t.Fatalf("expected content to be 2345, got %s", buf.String()) } - buf.Write([]byte("6789")) + if _, err := buf.Write([]byte("6789")); err != nil { + t.Error("Buffer write caused an unexpected error", err) + } + if buf.NewBytesWritten() != 4 { t.Fatalf("expected new bytes written to be 4, got %d", buf.NewBytesWritten()) } diff --git a/util/rpc/rpc.go b/util/rpc/rpc.go index 67c84096..aec1a226 100644 --- a/util/rpc/rpc.go +++ b/util/rpc/rpc.go @@ -10,6 +10,7 @@ import ( "github.com/ohsu-comp-bio/funnel/config" "golang.org/x/net/context" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" ) // PerRPCPassword returns a new gRPC DialOption which includes a basic auth. @@ -44,7 +45,7 @@ func Dial(pctx context.Context, conf config.RPCClient, opts ...grpc.DialOption) defer cancel() defaultOpts := []grpc.DialOption{ - grpc.WithInsecure(), + grpc.WithTransportCredentials(insecure.NewCredentials()), PerRPCPassword(conf.User, conf.Password), } opts = append(opts, defaultOpts...) diff --git a/webdash/http.go b/webdash/http.go index 9ef52751..671116a4 100644 --- a/webdash/http.go +++ b/webdash/http.go @@ -1,6 +1,7 @@ package webdash import ( + "fmt" "net/http" assetfs "github.com/elazarl/go-bindata-assetfs" @@ -24,6 +25,8 @@ func FileServer() http.Handler { // RootHandler returns an http handler which always responds with the /index.html file. func RootHandler() http.Handler { return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { - resp.Write(index) + if _, err := resp.Write(index); err != nil { + fmt.Printf("Detected error while writing HTTP response: %s\n", err) + } }) } diff --git a/webdash/web.go b/webdash/web.go index 5a1ad82e..dbb1d8de 100644 --- a/webdash/web.go +++ b/webdash/web.go @@ -21,7 +21,6 @@ import ( "compress/gzip" "fmt" "io" - "io/ioutil" "os" "path/filepath" "strings" @@ -515,7 +514,7 @@ func RestoreAsset(dir, name string) error { if err != nil { return err } - err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) + err = os.WriteFile(_filePath(dir, name), data, info.Mode()) if err != nil { return err } diff --git a/worker/file_mapper.go b/worker/file_mapper.go index 2db997c2..a9cd28bc 100644 --- a/worker/file_mapper.go +++ b/worker/file_mapper.go @@ -2,15 +2,14 @@ package worker import ( "fmt" - "io/ioutil" "os" "path" "path/filepath" "strings" - proto "github.com/golang/protobuf/proto" "github.com/ohsu-comp-bio/funnel/tes" "github.com/ohsu-comp-bio/funnel/util/fsutil" + "google.golang.org/protobuf/proto" ) // FileMapper is responsible for mapping paths into a working directory on the @@ -151,7 +150,7 @@ func (mapper *FileMapper) HostPath(src string) (string, error) { // OpenHostFile opens a file on the host file system at a mapped path. // "src" is an unmapped path. This function will handle mapping the path. // -// This function calls os.Open +// This function calls os.Open. // // If the path can't be mapped or the file can't be opened, an error is returned. func (mapper *FileMapper) OpenHostFile(src string) (*os.File, error) { @@ -169,7 +168,7 @@ func (mapper *FileMapper) OpenHostFile(src string) (*os.File, error) { // CreateHostFile creates a file on the host file system at a mapped path. // "src" is an unmapped path. This function will handle mapping the path. // -// This function calls os.Create +// This function calls os.Create. // // If the path can't be mapped or the file can't be created, an error is returned. func (mapper *FileMapper) CreateHostFile(src string) (*os.File, error) { @@ -234,7 +233,7 @@ func (mapper *FileMapper) AddInput(input *tes.Input) error { // If 'content' field is set create the file if input.Content != "" { - err := ioutil.WriteFile(hostPath, []byte(input.Content), 0775) + err := os.WriteFile(hostPath, []byte(input.Content), 0775) if err != nil { return fmt.Errorf("Error writing content of task input to file %v", err) } diff --git a/worker/file_mapper_test.go b/worker/file_mapper_test.go index b6a15b7a..c59b41c7 100644 --- a/worker/file_mapper_test.go +++ b/worker/file_mapper_test.go @@ -2,7 +2,6 @@ package worker import ( "fmt" - "io/ioutil" "os" "testing" @@ -11,7 +10,7 @@ import ( ) func TestMapTask(t *testing.T) { - tmp, err := ioutil.TempDir("", "funnel-test-mapper") + tmp, err := os.MkdirTemp("", "funnel-test-mapper") if err != nil { t.Fatal(err) } @@ -139,7 +138,7 @@ func TestMapTask(t *testing.T) { t.Fatal("unexpected mapper inputs") } - c, err := ioutil.ReadFile(tmp + "/inputs/testdata/contents.txt") + c, err := os.ReadFile(tmp + "/inputs/testdata/contents.txt") if err != nil { t.Fatal(err) } diff --git a/worker/file_taskreader.go b/worker/file_taskreader.go index 77aac158..34d013bc 100644 --- a/worker/file_taskreader.go +++ b/worker/file_taskreader.go @@ -5,8 +5,8 @@ import ( "fmt" "os" - "github.com/golang/protobuf/jsonpb" "github.com/ohsu-comp-bio/funnel/tes" + "google.golang.org/protobuf/encoding/protojson" ) // FileTaskReader provides a TaskReader implementation from a task file. @@ -18,14 +18,13 @@ type FileTaskReader struct { func NewFileTaskReader(path string) (*FileTaskReader, error) { // TODO not sure if it's better to return an error immediately, // or return an error from Task() - fh, err := os.Open(path) + data, err := os.ReadFile(path) if err != nil { return nil, fmt.Errorf("opening task file: %v", err) } - defer fh.Close() task := &tes.Task{} - err = jsonpb.Unmarshal(fh, task) + err = protojson.Unmarshal(data, task) if err != nil { return nil, fmt.Errorf("unmarshaling task file: %v", err) } diff --git a/worker/kubernetes.go b/worker/kubernetes.go index 948553a8..af5cbc3a 100644 --- a/worker/kubernetes.go +++ b/worker/kubernetes.go @@ -19,18 +19,18 @@ import ( // KubernetesCommand is responsible for configuring and running a task in a Kubernetes cluster. type KubernetesCommand struct { - TaskId string - JobId int - StdinFile string - TaskTemplate string - Namespace string - Resources *tes.Resources + TaskId string + JobId int + StdinFile string + TaskTemplate string + Namespace string + Resources *tes.Resources Command } // Creates a new Kuberntes Job which will run the task. func (kcmd KubernetesCommand) Run(ctx context.Context) error { - var taskId = kcmd.TaskId + var taskId = kcmd.TaskId tpl, err := template.New(taskId).Parse(kcmd.TaskTemplate) if err != nil { @@ -78,7 +78,7 @@ func (kcmd KubernetesCommand) Run(ctx context.Context) error { var client = clientset.BatchV1().Jobs(kcmd.Namespace) - _ , err = client.Create(ctx, job, metav1.CreateOptions{}) + _, err = client.Create(ctx, job, metav1.CreateOptions{}) if err != nil { return fmt.Errorf("creating job: %v", err) @@ -86,6 +86,10 @@ func (kcmd KubernetesCommand) Run(ctx context.Context) error { // Wait until the job finishes watcher, err := client.Watch(ctx, metav1.ListOptions{LabelSelector: fmt.Sprintf("job-name=%s-%d", taskId, kcmd.JobId)}) + if err != nil { + return err + } + defer watcher.Stop() waitForJobFinnish(ctx, watcher) @@ -96,7 +100,7 @@ func (kcmd KubernetesCommand) Run(ctx context.Context) error { for _, v := range pods.Items { req := clientset.CoreV1().Pods(kcmd.Namespace).GetLogs(v.Name, &corev1.PodLogOptions{}) - podLogs, err := req.Stream(ctx) + podLogs, err := req.Stream(ctx) if err != nil { return err @@ -106,12 +110,15 @@ func (kcmd KubernetesCommand) Run(ctx context.Context) error { buf := new(bytes.Buffer) _, err = io.Copy(buf, podLogs) if err != nil { - return err + return err } var bytes = buf.Bytes() - kcmd.Stdout.Write(bytes) - } + _, err = kcmd.Stdout.Write(bytes) + if err != nil { + return err + } + } return nil } @@ -164,4 +171,4 @@ func getKubernetesClientset() (*kubernetes.Clientset, error) { clientset, err := kubernetes.NewForConfig(kubeconfig) return clientset, err -} \ No newline at end of file +} diff --git a/worker/step.go b/worker/step.go index adcfddb7..2561cb25 100644 --- a/worker/step.go +++ b/worker/step.go @@ -2,6 +2,7 @@ package worker import ( "context" + "fmt" "io" "time" @@ -39,7 +40,8 @@ func (s *stepWorker) Run(ctx context.Context) error { // Capture stdout/err to file. if s.Command.GetStdout() != nil { - stdout = io.MultiWriter(s.Command.GetStdout(), stdout) } + stdout = io.MultiWriter(s.Command.GetStdout(), stdout) + } if s.Command.GetStderr() != nil { stderr = io.MultiWriter(s.Command.GetStderr(), stderr) } @@ -55,7 +57,9 @@ func (s *stepWorker) Run(ctx context.Context) error { select { case <-ctx.Done(): // Likely the task was canceled. - s.Command.Stop() + if err := s.Command.Stop(); err != nil { + fmt.Printf("Detected error when sending STOP command to a step-worker: %s\n", err) + } <-done s.Event.EndTime(time.Now()) return ctx.Err() diff --git a/worker/storage.go b/worker/storage.go index 542f5aa5..b174cb49 100644 --- a/worker/storage.go +++ b/worker/storage.go @@ -204,7 +204,7 @@ func (u *upload) Failed(err error) { // fixLinks walks the output paths, fixing cases where a symlink is // broken because it's pointing to a path inside a container volume. func fixLinks(mapper *FileMapper, basepath string) { - filepath.Walk(basepath, func(p string, f os.FileInfo, err error) error { + _ = filepath.Walk(basepath, func(p string, f os.FileInfo, err error) error { if err != nil { // There's an error, so be safe and give up on this file return nil @@ -235,11 +235,9 @@ func fixLinks(mapper *FileMapper, basepath string) { // If the mapped path exists, fix the symlink if err == nil { - err := os.Remove(p) - if err != nil { - return nil + if err = os.Remove(p); err == nil { + _ = os.Symlink(mapped, p) } - os.Symlink(mapped, p) } } } diff --git a/worker/taskreader_test.go b/worker/taskreader_test.go index 994d13c2..3c8d1073 100644 --- a/worker/taskreader_test.go +++ b/worker/taskreader_test.go @@ -13,6 +13,11 @@ func TestFileTaskReader(t *testing.T) { ctx := context.Background() task, err := r.Task(ctx) + + if err != nil { + t.Fatal(err) + } + if task.Name != "Hello world" { t.Error("unexpected task content") } @@ -30,6 +35,11 @@ func TestBase64TaskReader(t *testing.T) { ctx := context.Background() task, err := r.Task(ctx) + + if err != nil { + t.Fatal(err) + } + if task.Name != "Hello world" { t.Error("unexpected task content") } diff --git a/worker/worker.go b/worker/worker.go index f14760e6..75dfac53 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -19,19 +19,19 @@ import ( // sequential process of task initialization, execution, finalization, // and logging. type DefaultWorker struct { - Executor Executor - Conf config.Worker - Store storage.Storage - TaskReader TaskReader - EventWriter events.Writer + Executor Executor + Conf config.Worker + Store storage.Storage + TaskReader TaskReader + EventWriter events.Writer } // Configuration of the task executor. type Executor struct { // "docker" or "kubernetes" - Backend string + Backend string // Kubernetes executor template - Template string + Template string // Kubernetes namespace Namespace string } @@ -59,10 +59,16 @@ func (r *DefaultWorker) Run(pctx context.Context) (runerr error) { // TODO if we failed to retrieve the task, we can't do anything useful. // but, it's also difficult to report the failure usefully. if run.syserr != nil { - r.EventWriter.WriteEvent(pctx, events.NewSystemLog("unknown", 0, 0, "error", + sl := events.NewSystemLog("unknown", 0, 0, "error", "failed to get task. ID unknown", map[string]string{ "error": run.syserr.Error(), - })) + }) + + if err2 := r.EventWriter.WriteEvent(pctx, sl); err2 != nil { + fmt.Printf("Detected error while writing SystemLog event "+ + "about failing to retrieve the task: %s\n", err2) + } + runerr = run.syserr return } @@ -106,7 +112,10 @@ func (r *DefaultWorker) Run(pctx context.Context) (runerr error) { // cleanup workdir if !r.Conf.LeaveWorkDir { - mapper.Cleanup() + if err := mapper.Cleanup(); err != nil { + fmt.Printf("Detected error while cleaning up [%s]: %s\n", + mapper.WorkDir, err) + } } }() @@ -146,19 +155,19 @@ func (r *DefaultWorker) Run(pctx context.Context) (runerr error) { if run.ok() { for i, d := range task.GetExecutors() { var command = Command{ - Image: d.Image, - ShellCommand: d.Command, - Volumes: mapper.Volumes, - Workdir: d.Workdir, - Env: d.Env, - Event: event.NewExecutorWriter(uint32(i)), + Image: d.Image, + ShellCommand: d.Command, + Volumes: mapper.Volumes, + Workdir: d.Workdir, + Env: d.Env, + Event: event.NewExecutorWriter(uint32(i)), } var taskCommand TaskCommand if r.Executor.Backend == "kubernetes" { taskCommand = &KubernetesCommand{ TaskId: task.Id, - JobId: i, + JobId: i, StdinFile: d.Stdin, TaskTemplate: r.Executor.Template, Namespace: r.Executor.Namespace, @@ -167,16 +176,16 @@ func (r *DefaultWorker) Run(pctx context.Context) (runerr error) { } } else { taskCommand = &DockerCommand{ - ContainerName: fmt.Sprintf("%s-%d", task.Id, i), + ContainerName: fmt.Sprintf("%s-%d", task.Id, i), //TODO Make RemoveContainer configurable - RemoveContainer: true, + RemoveContainer: true, Command: command, } } s := &stepWorker{ - Conf: r.Conf, - Event: event.NewExecutorWriter(uint32(i)), + Conf: r.Conf, + Event: event.NewExecutorWriter(uint32(i)), Command: taskCommand, }