From 7a107b35f5ad80eb34c48018b60fe2a0fa0ce339 Mon Sep 17 00:00:00 2001 From: Enrico Rotundo Date: Thu, 8 Dec 2022 16:05:54 +0100 Subject: [PATCH] Refactor model.Job and `/submit` payload + make canary tests work locally (#1430) --- cmd/bacalhau/create.go | 36 ++--- cmd/bacalhau/create_test.go | 2 +- cmd/bacalhau/describe.go | 22 +-- cmd/bacalhau/describe_test.go | 18 +-- cmd/bacalhau/docker_run_test.go | 6 +- cmd/bacalhau/list.go | 4 +- cmd/bacalhau/list_test.go | 8 +- cmd/bacalhau/utils.go | 35 +++-- cmd/bacalhau/wasm_run.go | 8 +- docs/docs.go | 148 +++++++++++------- docs/swagger.json | 148 +++++++++++------- docs/swagger.yaml | 138 ++++++++-------- docs/swagger/endpoints_submit.md | 45 +----- ops/aws/canary/lambda/go.mod | 67 ++------ ops/aws/canary/lambda/go.sum | 144 +++++------------ ops/aws/canary/lambda/pkg/scenarios/list.go | 5 +- ops/aws/canary/lambda/pkg/scenarios/submit.go | 5 +- .../lambda/pkg/scenarios/submitAndDescribe.go | 15 +- .../lambda/pkg/scenarios/submitAndGet.go | 7 +- .../scenarios/submitDockerIPFSJobAndGet.go | 29 +++- .../pkg/scenarios/submitWithConcurrency.go | 7 +- ops/aws/canary/lambda/pkg/scenarios/utils.go | 58 +++++-- .../canary/lambda/pkg/test/scenarios_test.go | 20 ++- pkg/compute/backend/service.go | 4 +- .../bidstrategy/distance_delay_strategy.go | 10 +- pkg/compute/bidstrategy/export_test.go | 4 +- .../external_http_strategy_test.go | 2 +- pkg/compute/bidstrategy/type.go | 4 +- pkg/compute/capacity/disk/calculator.go | 2 +- pkg/compute/frontend/service.go | 6 +- pkg/compute/pubsub/backend_callback.go | 2 +- pkg/compute/pubsub/frontend_proxy.go | 12 +- pkg/compute/store/inmemory/store_test.go | 6 +- .../store/test/active_executions_test.go | 6 +- pkg/compute/store/utils_test.go | 6 +- pkg/executor/docker/executor.go | 4 +- pkg/executor/docker/executor_test.go | 4 +- pkg/executor/wasm/executor.go | 12 +- pkg/job/factory.go | 32 ++-- pkg/job/factory_test.go | 146 ++++++++++++++++- pkg/job/sharding.go | 4 +- pkg/job/state.go | 8 +- pkg/job/util.go | 8 +- pkg/job/validate.go | 23 ++- pkg/localdb/inmemory/inmemory.go | 20 +-- pkg/localdb/inmemory/inmemory_test.go | 6 +- pkg/model/job.go | 63 ++++---- pkg/publicapi/client.go | 11 +- pkg/publicapi/client_test.go | 4 +- pkg/publicapi/endpoints_list.go | 2 +- pkg/publicapi/endpoints_submit.go | 20 +-- pkg/publicapi/server.go | 8 +- pkg/publicapi/util.go | 2 +- pkg/publicapi/websocket_test.go | 2 +- pkg/requesternode/requesternode.go | 16 +- pkg/requesternode/shard_fsm.go | 14 +- pkg/test/compute/ask_for_bid_test.go | 2 +- pkg/test/compute/resourcelimits_test.go | 20 +-- pkg/test/compute/utils_test.go | 4 +- pkg/test/devstack/lotus_test.go | 7 +- pkg/test/devstack/sharding_test.go | 6 +- pkg/test/devstack/submit_test.go | 2 +- pkg/test/executor/test_runner.go | 18 ++- pkg/test/scenario/suite.go | 10 +- pkg/test/transport/transport_test.go | 8 +- pkg/verifier/deterministic/verifier.go | 16 +- pkg/verifier/noop/verifier.go | 8 +- testdata/job-invalid.yml | 8 +- testdata/job.yaml | 8 +- 69 files changed, 884 insertions(+), 681 deletions(-) diff --git a/cmd/bacalhau/create.go b/cmd/bacalhau/create.go index 01fbcbfe61..af34b9e591 100644 --- a/cmd/bacalhau/create.go +++ b/cmd/bacalhau/create.go @@ -167,41 +167,41 @@ func create(cmd *cobra.Command, cmdArgs []string, OC *CreateOptions) error { //n // Warn on fields with data that will be ignored var unusedFieldList []string - if j.ClientID != "" { + if j.Metadata.ClientID != "" { unusedFieldList = append(unusedFieldList, "ClientID") - j.ClientID = "" + j.Metadata.ClientID = "" } - if !reflect.DeepEqual(j.CreatedAt, time.Time{}) { + if !reflect.DeepEqual(j.Metadata.CreatedAt, time.Time{}) { unusedFieldList = append(unusedFieldList, "CreatedAt") - j.CreatedAt = time.Time{} + j.Metadata.CreatedAt = time.Time{} } - if !reflect.DeepEqual(j.ExecutionPlan, model.JobExecutionPlan{}) { + if !reflect.DeepEqual(j.Spec.ExecutionPlan, model.JobExecutionPlan{}) { unusedFieldList = append(unusedFieldList, "Verification") - j.ExecutionPlan = model.JobExecutionPlan{} + j.Spec.ExecutionPlan = model.JobExecutionPlan{} } - if len(j.Events) != 0 { + if len(j.Status.Events) != 0 { unusedFieldList = append(unusedFieldList, "Events") - j.Events = nil + j.Status.Events = nil } - if j.ID != "" { + if j.Metadata.ID != "" { unusedFieldList = append(unusedFieldList, "ID") - j.ID = "" + j.Metadata.ID = "" } - if len(j.LocalEvents) != 0 { + if len(j.Status.LocalEvents) != 0 { unusedFieldList = append(unusedFieldList, "LocalEvents") - j.LocalEvents = nil + j.Status.LocalEvents = nil } - if j.RequesterNodeID != "" { + if j.Status.Requester.RequesterNodeID != "" { unusedFieldList = append(unusedFieldList, "RequesterNodeID") - j.RequesterNodeID = "" + j.Status.Requester.RequesterNodeID = "" } - if len(j.RequesterPublicKey) != 0 { + if len(j.Status.Requester.RequesterPublicKey) != 0 { unusedFieldList = append(unusedFieldList, "RequesterPublicKey") - j.RequesterPublicKey = nil + j.Status.Requester.RequesterPublicKey = nil } - if !reflect.DeepEqual(j.State, model.JobState{}) { + if !reflect.DeepEqual(j.Status.State, model.JobState{}) { unusedFieldList = append(unusedFieldList, "State") - j.State = model.JobState{} + j.Status.State = model.JobState{} } // Warn on fields with data that will be ignored diff --git a/cmd/bacalhau/create_test.go b/cmd/bacalhau/create_test.go index a0117ed8e3..b62537e548 100644 --- a/cmd/bacalhau/create_test.go +++ b/cmd/bacalhau/create_test.go @@ -132,7 +132,7 @@ func (s *CreateSuite) TestCreateFromStdin() { _, out, err = ExecuteTestCobraCommand(s.T(), "describe", "--api-host", host, "--api-port", port, - job.ID, + job.Metadata.ID, ) require.NoError(s.T(), err, "Error describing job.") diff --git a/cmd/bacalhau/describe.go b/cmd/bacalhau/describe.go index 415d091e46..fece9437dd 100644 --- a/cmd/bacalhau/describe.go +++ b/cmd/bacalhau/describe.go @@ -108,38 +108,38 @@ func describe(cmd *cobra.Command, cmdArgs []string, OD *DescribeOptions) error { Fatal(cmd, "", 1) } - shardStates, err := GetAPIClient().GetJobState(ctx, j.ID) + shardStates, err := GetAPIClient().GetJobState(ctx, j.Metadata.ID) if err != nil { - Fatal(cmd, fmt.Sprintf("Failure retrieving job states '%s': %s\n", j.ID, err), 1) + Fatal(cmd, fmt.Sprintf("Failure retrieving job states '%s': %s\n", j.Metadata.ID, err), 1) } - jobEvents, err := GetAPIClient().GetEvents(ctx, j.ID) + jobEvents, err := GetAPIClient().GetEvents(ctx, j.Metadata.ID) if err != nil { - Fatal(cmd, fmt.Sprintf("Failure retrieving job events '%s': %s\n", j.ID, err), 1) + Fatal(cmd, fmt.Sprintf("Failure retrieving job events '%s': %s\n", j.Metadata.ID, err), 1) } - localEvents, err := GetAPIClient().GetLocalEvents(ctx, j.ID) + localEvents, err := GetAPIClient().GetLocalEvents(ctx, j.Metadata.ID) if err != nil { - Fatal(cmd, fmt.Sprintf("Failure retrieving job events '%s': %s\n", j.ID, err), 1) + Fatal(cmd, fmt.Sprintf("Failure retrieving job events '%s': %s\n", j.Metadata.ID, err), 1) } jobDesc := j - jobDesc.State = shardStates + jobDesc.Status.State = shardStates if OD.IncludeEvents { - jobDesc.Events = jobEvents - jobDesc.LocalEvents = localEvents + jobDesc.Status.Events = jobEvents + jobDesc.Status.LocalEvents = localEvents } b, err := model.JSONMarshalWithMax(jobDesc) if err != nil { - Fatal(cmd, fmt.Sprintf("Failure marshaling job description '%s': %s\n", j.ID, err), 1) + Fatal(cmd, fmt.Sprintf("Failure marshaling job description '%s': %s\n", j.Metadata.ID, err), 1) } // Convert Json to Yaml y, err := yaml.JSONToYAML(b) if err != nil { - Fatal(cmd, fmt.Sprintf("Able to marshal to YAML but not JSON whatttt '%s': %s\n", j.ID, err), 1) + Fatal(cmd, fmt.Sprintf("Able to marshal to YAML but not JSON whatttt '%s': %s\n", j.Metadata.ID, err), 1) } cmd.Print(string(y)) diff --git a/cmd/bacalhau/describe_test.go b/cmd/bacalhau/describe_test.go index b4f151c221..e4bca87c69 100644 --- a/cmd/bacalhau/describe_test.go +++ b/cmd/bacalhau/describe_test.go @@ -83,13 +83,13 @@ func (suite *DescribeSuite) TestDescribeJob() { _, out, err = ExecuteTestCobraCommand(suite.T(), "describe", "--api-host", host, "--api-port", port, - submittedJob.ID, + submittedJob.Metadata.ID, ) require.NoError(suite.T(), err, "Error in describing job: %+v", err) err = model.YAMLUnmarshalWithMax([]byte(out), returnedJob) require.NoError(suite.T(), err, "Error in unmarshalling description: %+v", err) - require.Equal(suite.T(), submittedJob.ID, returnedJob.ID, "IDs do not match.") + require.Equal(suite.T(), submittedJob.Metadata.ID, returnedJob.Metadata.ID, "IDs do not match.") require.Equal(suite.T(), submittedJob.Spec.Docker.Entrypoint[0], returnedJob.Spec.Docker.Entrypoint[0], @@ -98,14 +98,14 @@ func (suite *DescribeSuite) TestDescribeJob() { // Job Id in the middle _, out, err = ExecuteTestCobraCommand(suite.T(), "describe", "--api-host", host, - submittedJob.ID, + submittedJob.Metadata.ID, "--api-port", port, ) require.NoError(suite.T(), err, "Error in describing job: %+v", err) err = model.YAMLUnmarshalWithMax([]byte(out), returnedJob) require.NoError(suite.T(), err, "Error in unmarshalling description: %+v", err) - require.Equal(suite.T(), submittedJob.ID, returnedJob.ID, "IDs do not match.") + require.Equal(suite.T(), submittedJob.Metadata.ID, returnedJob.Metadata.ID, "IDs do not match.") require.Equal(suite.T(), submittedJob.Spec.Docker.Entrypoint[0], returnedJob.Spec.Docker.Entrypoint[0], @@ -114,14 +114,14 @@ func (suite *DescribeSuite) TestDescribeJob() { // Short job id _, out, err = ExecuteTestCobraCommand(suite.T(), "describe", "--api-host", host, - submittedJob.ID[0:model.ShortIDLength], + submittedJob.Metadata.ID[0:model.ShortIDLength], "--api-port", port, ) require.NoError(suite.T(), err, "Error in describing job: %+v", err) err = model.YAMLUnmarshalWithMax([]byte(out), returnedJob) require.NoError(suite.T(), err, "Error in unmarshalling description: %+v", err) - require.Equal(suite.T(), submittedJob.ID, returnedJob.ID, "IDs do not match.") + require.Equal(suite.T(), submittedJob.Metadata.ID, returnedJob.Metadata.ID, "IDs do not match.") require.Equal(suite.T(), submittedJob.Spec.Docker.Entrypoint[0], returnedJob.Spec.Docker.Entrypoint[0], @@ -159,7 +159,7 @@ func (suite *DescribeSuite) TestDescribeJobIncludeEvents() { var args []string - args = append(args, "describe", "--api-host", host, "--api-port", port, submittedJob.ID) + args = append(args, "describe", "--api-host", host, "--api-port", port, submittedJob.Metadata.ID) if tc.includeEvents { args = append(args, "--include-events") } @@ -225,7 +225,7 @@ func (s *DescribeSuite) TestDescribeJobEdgeCases() { // If describeID is empty, should return use submitted ID. Otherwise, use describeID if tc.describeIDEdgecase == "" { - jobID = submittedJob.ID + jobID = submittedJob.Metadata.ID } else { jobID = tc.describeIDEdgecase } @@ -240,7 +240,7 @@ func (s *DescribeSuite) TestDescribeJobEdgeCases() { err = model.YAMLUnmarshalWithMax([]byte(out), &returnedJob) require.NoError(s.T(), err, "Error in unmarshalling description: %+v", err) - require.Equal(s.T(), submittedJob.ID, returnedJob.ID, "IDs do not match.") + require.Equal(s.T(), submittedJob.Metadata.ID, returnedJob.Metadata.ID, "IDs do not match.") require.Equal(s.T(), submittedJob.Spec.Docker.Entrypoint[0], returnedJob.Spec.Docker.Entrypoint[0], diff --git a/cmd/bacalhau/docker_run_test.go b/cmd/bacalhau/docker_run_test.go index ae13f430fd..7dc117d75a 100644 --- a/cmd/bacalhau/docker_run_test.go +++ b/cmd/bacalhau/docker_run_test.go @@ -493,10 +493,10 @@ func (s *DockerRunSuite) TestRun_CreatedAt() { j := testutils.GetJobFromTestOutput(ctx, s.T(), c, out) - require.LessOrEqual(s.T(), j.CreatedAt, time.Now(), "Created at time is not less than or equal to now.") + require.LessOrEqual(s.T(), j.Metadata.CreatedAt, time.Now(), "Created at time is not less than or equal to now.") oldStartTime, _ := time.Parse(time.RFC3339, "2021-01-01T01:01:01+00:00") - require.GreaterOrEqual(s.T(), j.CreatedAt, oldStartTime, "Created at time is not greater or equal to 2022-01-01.") + require.GreaterOrEqual(s.T(), j.Metadata.CreatedAt, oldStartTime, "Created at time is not greater or equal to 2022-01-01.") }() } @@ -768,7 +768,7 @@ func (s *DockerRunSuite) TestRun_Deterministic_Verifier() { return "", err } j := testutils.GetJobFromTestOutput(ctx, s.T(), apiClient, out) - return j.ID, nil + return j.Metadata.ID, nil } // test that we must have more than one node to run the job diff --git a/cmd/bacalhau/list.go b/cmd/bacalhau/list.go index 12ef5377bd..92785b1473 100644 --- a/cmd/bacalhau/list.go +++ b/cmd/bacalhau/list.go @@ -242,8 +242,8 @@ func summarizeJob(ctx context.Context, j *model.Job, OL *ListOptions) (table.Row resultSummary := job.ComputeResultsSummary(j) row := table.Row{ - shortenTime(OL.OutputWide, j.CreatedAt), - shortID(OL.OutputWide, j.ID), + shortenTime(OL.OutputWide, j.Metadata.CreatedAt), + shortID(OL.OutputWide, j.Metadata.ID), shortenString(OL.OutputWide, strings.Join(jobDesc, " ")), shortenString(OL.OutputWide, stateSummary), shortenString(OL.OutputWide, verifiedSummary), diff --git a/cmd/bacalhau/list_test.go b/cmd/bacalhau/list_test.go index 196ea017c3..581f2f4881 100644 --- a/cmd/bacalhau/list_test.go +++ b/cmd/bacalhau/list_test.go @@ -95,8 +95,8 @@ func (suite *ListSuite) TestList_IdFilter() { var err error j := publicapi.MakeNoopJob() j, err = c.Submit(ctx, j, nil) - jobIds = append(jobIds, shortID(false, j.ID)) - jobLongIds = append(jobIds, j.ID) + jobIds = append(jobIds, shortID(false, j.Metadata.ID)) + jobLongIds = append(jobIds, j.Metadata.ID) require.NoError(suite.T(), err) } @@ -146,7 +146,7 @@ func (suite *ListSuite) TestList_IdFilter() { require.NoError(suite.T(), err) - require.Contains(suite.T(), firstItem.ID, jobLongIds[0], "The filtered job id was not found in the response") + require.Contains(suite.T(), firstItem.Metadata.ID, jobLongIds[0], "The filtered job id was not found in the response") require.Equal(suite.T(), 1, len(response.Jobs), "The list of jobs is not strictly filtered to the requested job id") } @@ -192,7 +192,7 @@ func (suite *ListSuite) TestList_SortFlags() { j := publicapi.MakeNoopJob() j, err = c.Submit(ctx, j, nil) require.NoError(suite.T(), err) - jobIDs = append(jobIDs, shortID(false, j.ID)) + jobIDs = append(jobIDs, shortID(false, j.Metadata.ID)) // all the middle jobs can have the same timestamp // but we need the first and last to differ diff --git a/cmd/bacalhau/utils.go b/cmd/bacalhau/utils.go index 7ac5fc656a..fe19c42839 100644 --- a/cmd/bacalhau/utils.go +++ b/cmd/bacalhau/utils.go @@ -317,13 +317,13 @@ func ExecuteJob(ctx context.Context, // because all code after this point is related to // "wait for the job to finish" (via WaitAndPrintResultsToUser) if !runtimeSettings.WaitForJobToFinish { - cmd.Print(j.ID + "\n") + cmd.Print(j.Metadata.ID + "\n") return nil } // if we are in --id-only mode - print the id if runtimeSettings.PrintJobIDOnly { - cmd.Print(j.ID + "\n") + cmd.Print(j.Metadata.ID + "\n") } // if we are only printing the id, set the rest of the output to "quiet", @@ -339,15 +339,15 @@ func ExecuteJob(ctx context.Context, } } - jobReturn, found, err := apiClient.Get(ctx, j.ID) + jobReturn, found, err := apiClient.Get(ctx, j.Metadata.ID) if err != nil { Fatal(cmd, fmt.Sprintf("Error getting job: %s", err), 1) } if !found { - Fatal(cmd, fmt.Sprintf("Weird. Just ran the job, but we couldn't find it. Should be impossible. ID: %s", j.ID), 1) + Fatal(cmd, fmt.Sprintf("Weird. Just ran the job, but we couldn't find it. Should be impossible. ID: %s", j.Metadata.ID), 1) } - js, err := apiClient.GetJobState(ctx, jobReturn.ID) + js, err := apiClient.GetJobState(ctx, jobReturn.Metadata.ID) if err != nil { Fatal(cmd, fmt.Sprintf("Error getting job state: %s", err), 1) } @@ -404,7 +404,7 @@ To download the results, execute: To get more details about the run, execute: %s%s describe %s -`, indentOne, getCommandLineExecutable(), j.ID, indentOne, getCommandLineExecutable(), j.ID) +`, indentOne, getCommandLineExecutable(), j.Metadata.ID, indentOne, getCommandLineExecutable(), j.Metadata.ID) // Have to do a final Sprintf so we can inject the resultsCID into the right place if resultsCID != "" { @@ -419,7 +419,7 @@ To get more details about the run, execute: ctx, cm, cmd, - j.ID, + j.Metadata.ID, downloadSettings, ) if err != nil { @@ -447,7 +447,7 @@ func downloadResultsHandler( } } - results, err := GetAPIClient().GetResults(ctx, j.ID) + results, err := GetAPIClient().GetResults(ctx, j.Metadata.ID) if err != nil { return err } @@ -456,7 +456,7 @@ func downloadResultsHandler( return fmt.Errorf("no results found") } - processedDownloadSettings, err := processDownloadSettings(downloadSettings, j.ID) + processedDownloadSettings, err := processDownloadSettings(downloadSettings, j.Metadata.ID) if err != nil { return err } @@ -544,15 +544,15 @@ func ReadFromStdinIfAvailable(cmd *cobra.Command, args []string) ([]byte, error) //nolint:gocyclo,funlen // Better way to do this, Go doesn't have a switch on type func WaitAndPrintResultsToUser(ctx context.Context, cmd *cobra.Command, j *model.Job, quiet bool) error { - if j == nil || j.ID == "" { + if j == nil || j.Metadata.ID == "" { return errors.New("No job returned from the server.") } getMoreInfoString := fmt.Sprintf(` To get more information at any time, run: - bacalhau describe %s`, j.ID) + bacalhau describe %s`, j.Metadata.ID) if !quiet { - cmd.Printf("Job successfully submitted. Job ID: %s\n", j.ID) + cmd.Printf("Job successfully submitted. Job ID: %s\n", j.Metadata.ID) cmd.Printf("Checking job status... (Enter Ctrl+C to exit at any time, your job will continue running):\n\n") } @@ -567,9 +567,9 @@ To get more information at any time, run: time.Sleep(1 * time.Second) - jobEvents, err := GetAPIClient().GetEvents(ctx, j.ID) + jobEvents, err := GetAPIClient().GetEvents(ctx, j.Metadata.ID) if err != nil { - Fatal(cmd, fmt.Sprintf("Failure retrieving job events '%s': %s\n", j.ID, err), 1) + Fatal(cmd, fmt.Sprintf("Failure retrieving job events '%s': %s\n", j.Metadata.ID, err), 1) } // Capture Ctrl+C if the user wants to finish early the job @@ -621,9 +621,10 @@ To get more information at any time, run: if err != nil { if _, ok := err.(*bacerrors.JobNotFound); ok { - Fatal(cmd, fmt.Sprintf("Somehow even though we submitted a job successfully, we were not able to get its status. ID: %s", j.ID), 1) + Fatal(cmd, fmt.Sprintf(`Somehow even though we submitted a job successfully, + we were not able to get its status. ID: %s`, j.Metadata.ID), 1) } else { - Fatal(cmd, fmt.Sprintf("Unknown error trying to get job (ID: %s): %+v", j.ID, err), 1) + Fatal(cmd, fmt.Sprintf("Unknown error trying to get job (ID: %s): %+v", j.Metadata.ID, err), 1) } } @@ -648,7 +649,7 @@ To get more information at any time, run: signalChan <- syscall.SIGINT break } else { - jobEvents, err = GetAPIClient().GetEvents(ctx, j.ID) + jobEvents, err = GetAPIClient().GetEvents(ctx, j.Metadata.ID) if err != nil { if _, ok := err.(*bacerrors.ContextCanceledError); ok { // We're done, the user canceled the job diff --git a/cmd/bacalhau/wasm_run.go b/cmd/bacalhau/wasm_run.go index 69815a24b5..56f6e8a34e 100644 --- a/cmd/bacalhau/wasm_run.go +++ b/cmd/bacalhau/wasm_run.go @@ -95,15 +95,15 @@ func newRunWasmCmd() *cobra.Command { `What publisher engine to use to publish the job results`, ) runWasmCommand.PersistentFlags().IntVarP( - &wasmJob.Deal.Concurrency, "concurrency", "c", wasmJob.Deal.Concurrency, + &wasmJob.Spec.Deal.Concurrency, "concurrency", "c", wasmJob.Spec.Deal.Concurrency, `How many nodes should run the job`, ) runWasmCommand.PersistentFlags().IntVar( - &wasmJob.Deal.Confidence, "confidence", wasmJob.Deal.Confidence, + &wasmJob.Spec.Deal.Confidence, "confidence", wasmJob.Spec.Deal.Confidence, `The minimum number of nodes that must agree on a verification result`, ) runWasmCommand.PersistentFlags().IntVar( - &wasmJob.Deal.MinBids, "min-bids", wasmJob.Deal.MinBids, + &wasmJob.Spec.Deal.MinBids, "min-bids", wasmJob.Spec.Deal.MinBids, `Minimum number of bids that must be received before concurrency-many bids will be accepted (at random)`, ) runWasmCommand.PersistentFlags().Float64Var( @@ -200,7 +200,7 @@ func runWasm( // We can only use a Deterministic verifier if we have multiple nodes running the job // If the user has selected a Deterministic verifier (or we are using it by default) // then switch back to a Noop Verifier if the concurrency is too low. - if wasmJob.Deal.Concurrency <= 1 && wasmJob.Spec.Verifier == model.VerifierDeterministic { + if wasmJob.Spec.Deal.Concurrency <= 1 && wasmJob.Spec.Verifier == model.VerifierDeterministic { wasmJob.Spec.Verifier = model.VerifierNoop } diff --git a/docs/docs.go b/docs/docs.go index 6660b01639..c2e35659a9 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -422,7 +422,7 @@ const docTemplate = `{ }, "/submit": { "post": { - "description": "Description:\n\n* ` + "`" + `client_public_key` + "`" + `: The base64-encoded public key of the client.\n* ` + "`" + `signature` + "`" + `: A base64-encoded signature of the ` + "`" + `data` + "`" + ` attribute, signed by the client.\n* ` + "`" + `data` + "`" + `\n * ` + "`" + `ClientID` + "`" + `: Request must specify a ` + "`" + `ClientID` + "`" + `. To retrieve your ` + "`" + `ClientID` + "`" + `, you can do the following: (1) submit a dummy job to Bacalhau (or use one you created before), (2) run ` + "`" + `bacalhau describe \u003cjob-id\u003e` + "`" + ` and fetch the ` + "`" + `ClientID` + "`" + ` field.\n * ` + "`" + `Job` + "`" + `: see example below.\n\nExample request\n` + "`" + `` + "`" + `` + "`" + `json\n{\n\t\"data\": {\n\t\t\"ClientID\": \"ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51\",\n\t\t\"Job\": {\n\t\t\t\"APIVersion\": \"V1beta1\",\n\t\t\t\"Spec\": {\n\t\t\t\t\"Engine\": \"Docker\",\n\t\t\t\t\"Verifier\": \"Noop\",\n\t\t\t\t\"Publisher\": \"Estuary\",\n\t\t\t\t\"Docker\": {\n\t\t\t\t\t\"Image\": \"ubuntu\",\n\t\t\t\t\t\"Entrypoint\": [\n\t\t\t\t\t\t\"date\"\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"Timeout\": 1800,\n\t\t\t\t\"outputs\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"StorageSource\": \"IPFS\",\n\t\t\t\t\t\t\"Name\": \"outputs\",\n\t\t\t\t\t\t\"path\": \"/outputs\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"Sharding\": {\n\t\t\t\t\t\"BatchSize\": 1,\n\t\t\t\t\t\"GlobPatternBasePath\": \"/inputs\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"Deal\": {\n\t\t\t\t\"Concurrency\": 1\n\t\t\t}\n\t\t}\n\t},\n\t\"signature\": \"...\",\n\t\"client_public_key\": \"...\"\n}\n` + "`" + `` + "`" + `` + "`" + `", + "description": "Description:\n\n* ` + "`" + `client_public_key` + "`" + `: The base64-encoded public key of the client.\n* ` + "`" + `signature` + "`" + `: A base64-encoded signature of the ` + "`" + `data` + "`" + ` attribute, signed by the client.\n* ` + "`" + `job_create_payload` + "`" + `:\n * ` + "`" + `ClientID` + "`" + `: Request must specify a ` + "`" + `ClientID` + "`" + `. To retrieve your ` + "`" + `ClientID` + "`" + `, you can do the following: (1) submit a dummy job to Bacalhau (or use one you created before), (2) run ` + "`" + `bacalhau describe \u003cjob-id\u003e` + "`" + ` and fetch the ` + "`" + `ClientID` + "`" + ` field.\n\t* ` + "`" + `APIVersion` + "`" + `: e.g. ` + "`" + `\"V1beta1\"` + "`" + `.\n * ` + "`" + `Spec` + "`" + `: https://github.com/filecoin-project/bacalhau/blob/main/pkg/model/job.go\n", "consumes": [ "application/json" ], @@ -595,72 +595,31 @@ const docTemplate = `{ "type": "string", "example": "V1beta1" }, - "ClientID": { - "description": "The ID of the client that created this job.", - "type": "string", - "example": "ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51" - }, - "CreatedAt": { - "description": "Time the job was submitted to the bacalhau network.", - "type": "string", - "example": "2022-11-17T13:29:01.871140291Z" - }, - "Deal": { - "description": "The deal the client has made, such as which job bids they have accepted.", - "$ref": "#/definitions/model.Deal" - }, - "ExecutionPlan": { - "description": "how will this job be executed by nodes on the network", - "$ref": "#/definitions/model.JobExecutionPlan" - }, - "ID": { - "description": "The unique global ID of this job in the bacalhau network.", - "type": "string", - "example": "92d5d4ee-3765-4f78-8353-623f5f26df08" - }, - "JobEvents": { - "description": "All events associated with the job", - "type": "array", - "items": { - "$ref": "#/definitions/model.JobEvent" - } - }, - "JobState": { - "description": "The current state of the job", - "$ref": "#/definitions/model.JobState" - }, - "LocalJobEvents": { - "description": "All local events associated with the job", - "type": "array", - "items": { - "$ref": "#/definitions/model.JobLocalEvent" - } - }, - "RequesterNodeID": { - "description": "The ID of the requester node that owns this job.", - "type": "string", - "example": "QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF" - }, - "RequesterPublicKey": { - "description": "The public key of the Requester node that created this job\nThis can be used to encrypt messages back to the creator", - "type": "array", - "items": { - "type": "integer" - } + "Metadata": { + "$ref": "#/definitions/model.Metadata" }, "Spec": { "description": "The specification of this job.", "$ref": "#/definitions/model.Spec" + }, + "Status": { + "description": "The status of the job: where are the nodes at, what are the events", + "$ref": "#/definitions/model.JobStatus" } } }, "model.JobCreatePayload": { "type": "object", "required": [ + "APIVersion", "ClientID", - "Job" + "Spec" ], "properties": { + "APIVersion": { + "type": "string", + "example": "V1beta1" + }, "ClientID": { "description": "the id of the client that is submitting the job", "type": "string" @@ -669,9 +628,9 @@ const docTemplate = `{ "description": "Optional base64-encoded tar file that will be pinned to IPFS and\nmounted as storage for the job. Not part of the spec so we don't\nflood the transport layer with it (potentially very large).", "type": "string" }, - "Job": { - "description": "The job specification:", - "$ref": "#/definitions/model.Job" + "Spec": { + "description": "The specification of this job.", + "$ref": "#/definitions/model.Spec" } } }, @@ -790,6 +749,23 @@ const docTemplate = `{ } } }, + "model.JobRequester": { + "type": "object", + "properties": { + "RequesterNodeID": { + "description": "The ID of the requester node that owns this job.", + "type": "string", + "example": "QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF" + }, + "RequesterPublicKey": { + "description": "The public key of the Requester node that created this job\nThis can be used to encrypt messages back to the creator", + "type": "array", + "items": { + "type": "integer" + } + } + } + }, "model.JobShardState": { "type": "object", "properties": { @@ -946,6 +922,52 @@ const docTemplate = `{ } } }, + "model.JobStatus": { + "type": "object", + "properties": { + "JobEvents": { + "description": "All events associated with the job", + "type": "array", + "items": { + "$ref": "#/definitions/model.JobEvent" + } + }, + "JobState": { + "description": "The current state of the job", + "$ref": "#/definitions/model.JobState" + }, + "LocalJobEvents": { + "description": "All local events associated with the job", + "type": "array", + "items": { + "$ref": "#/definitions/model.JobLocalEvent" + } + }, + "Requester": { + "$ref": "#/definitions/model.JobRequester" + } + } + }, + "model.Metadata": { + "type": "object", + "properties": { + "ClientID": { + "description": "The ID of the client that created this job.", + "type": "string", + "example": "ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51" + }, + "CreatedAt": { + "description": "Time the job was submitted to the bacalhau network.", + "type": "string", + "example": "2022-11-17T13:29:01.871140291Z" + }, + "ID": { + "description": "The unique global ID of this job in the bacalhau network.", + "type": "string", + "example": "92d5d4ee-3765-4f78-8353-623f5f26df08" + } + } + }, "model.PublishedResult": { "type": "object", "properties": { @@ -1026,6 +1048,10 @@ const docTemplate = `{ "$ref": "#/definitions/model.StorageSpec" } }, + "Deal": { + "description": "The deal the client has made, such as which job bids they have accepted.", + "$ref": "#/definitions/model.Deal" + }, "DoNotTrack": { "description": "Do not track specified by the client", "type": "boolean" @@ -1038,6 +1064,10 @@ const docTemplate = `{ "description": "e.g. docker or language", "type": "integer" }, + "ExecutionPlan": { + "description": "how will this job be executed by nodes on the network", + "$ref": "#/definitions/model.JobExecutionPlan" + }, "Language": { "$ref": "#/definitions/model.JobSpecLanguage" }, @@ -1244,7 +1274,7 @@ const docTemplate = `{ "type": "object", "required": [ "client_public_key", - "data", + "job_create_payload", "signature" ], "properties": { @@ -1252,7 +1282,7 @@ const docTemplate = `{ "description": "The base64-encoded public key of the client:", "type": "string" }, - "data": { + "job_create_payload": { "description": "The data needed to submit and run a job on the network:", "$ref": "#/definitions/model.JobCreatePayload" }, diff --git a/docs/swagger.json b/docs/swagger.json index 50f35d3949..bedb9b20ca 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -417,7 +417,7 @@ }, "/submit": { "post": { - "description": "Description:\n\n* `client_public_key`: The base64-encoded public key of the client.\n* `signature`: A base64-encoded signature of the `data` attribute, signed by the client.\n* `data`\n * `ClientID`: Request must specify a `ClientID`. To retrieve your `ClientID`, you can do the following: (1) submit a dummy job to Bacalhau (or use one you created before), (2) run `bacalhau describe \u003cjob-id\u003e` and fetch the `ClientID` field.\n * `Job`: see example below.\n\nExample request\n```json\n{\n\t\"data\": {\n\t\t\"ClientID\": \"ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51\",\n\t\t\"Job\": {\n\t\t\t\"APIVersion\": \"V1beta1\",\n\t\t\t\"Spec\": {\n\t\t\t\t\"Engine\": \"Docker\",\n\t\t\t\t\"Verifier\": \"Noop\",\n\t\t\t\t\"Publisher\": \"Estuary\",\n\t\t\t\t\"Docker\": {\n\t\t\t\t\t\"Image\": \"ubuntu\",\n\t\t\t\t\t\"Entrypoint\": [\n\t\t\t\t\t\t\"date\"\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"Timeout\": 1800,\n\t\t\t\t\"outputs\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"StorageSource\": \"IPFS\",\n\t\t\t\t\t\t\"Name\": \"outputs\",\n\t\t\t\t\t\t\"path\": \"/outputs\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"Sharding\": {\n\t\t\t\t\t\"BatchSize\": 1,\n\t\t\t\t\t\"GlobPatternBasePath\": \"/inputs\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"Deal\": {\n\t\t\t\t\"Concurrency\": 1\n\t\t\t}\n\t\t}\n\t},\n\t\"signature\": \"...\",\n\t\"client_public_key\": \"...\"\n}\n```", + "description": "Description:\n\n* `client_public_key`: The base64-encoded public key of the client.\n* `signature`: A base64-encoded signature of the `data` attribute, signed by the client.\n* `job_create_payload`:\n * `ClientID`: Request must specify a `ClientID`. To retrieve your `ClientID`, you can do the following: (1) submit a dummy job to Bacalhau (or use one you created before), (2) run `bacalhau describe \u003cjob-id\u003e` and fetch the `ClientID` field.\n\t* `APIVersion`: e.g. `\"V1beta1\"`.\n * `Spec`: https://github.com/filecoin-project/bacalhau/blob/main/pkg/model/job.go\n", "consumes": [ "application/json" ], @@ -590,72 +590,31 @@ "type": "string", "example": "V1beta1" }, - "ClientID": { - "description": "The ID of the client that created this job.", - "type": "string", - "example": "ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51" - }, - "CreatedAt": { - "description": "Time the job was submitted to the bacalhau network.", - "type": "string", - "example": "2022-11-17T13:29:01.871140291Z" - }, - "Deal": { - "description": "The deal the client has made, such as which job bids they have accepted.", - "$ref": "#/definitions/model.Deal" - }, - "ExecutionPlan": { - "description": "how will this job be executed by nodes on the network", - "$ref": "#/definitions/model.JobExecutionPlan" - }, - "ID": { - "description": "The unique global ID of this job in the bacalhau network.", - "type": "string", - "example": "92d5d4ee-3765-4f78-8353-623f5f26df08" - }, - "JobEvents": { - "description": "All events associated with the job", - "type": "array", - "items": { - "$ref": "#/definitions/model.JobEvent" - } - }, - "JobState": { - "description": "The current state of the job", - "$ref": "#/definitions/model.JobState" - }, - "LocalJobEvents": { - "description": "All local events associated with the job", - "type": "array", - "items": { - "$ref": "#/definitions/model.JobLocalEvent" - } - }, - "RequesterNodeID": { - "description": "The ID of the requester node that owns this job.", - "type": "string", - "example": "QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF" - }, - "RequesterPublicKey": { - "description": "The public key of the Requester node that created this job\nThis can be used to encrypt messages back to the creator", - "type": "array", - "items": { - "type": "integer" - } + "Metadata": { + "$ref": "#/definitions/model.Metadata" }, "Spec": { "description": "The specification of this job.", "$ref": "#/definitions/model.Spec" + }, + "Status": { + "description": "The status of the job: where are the nodes at, what are the events", + "$ref": "#/definitions/model.JobStatus" } } }, "model.JobCreatePayload": { "type": "object", "required": [ + "APIVersion", "ClientID", - "Job" + "Spec" ], "properties": { + "APIVersion": { + "type": "string", + "example": "V1beta1" + }, "ClientID": { "description": "the id of the client that is submitting the job", "type": "string" @@ -664,9 +623,9 @@ "description": "Optional base64-encoded tar file that will be pinned to IPFS and\nmounted as storage for the job. Not part of the spec so we don't\nflood the transport layer with it (potentially very large).", "type": "string" }, - "Job": { - "description": "The job specification:", - "$ref": "#/definitions/model.Job" + "Spec": { + "description": "The specification of this job.", + "$ref": "#/definitions/model.Spec" } } }, @@ -785,6 +744,23 @@ } } }, + "model.JobRequester": { + "type": "object", + "properties": { + "RequesterNodeID": { + "description": "The ID of the requester node that owns this job.", + "type": "string", + "example": "QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF" + }, + "RequesterPublicKey": { + "description": "The public key of the Requester node that created this job\nThis can be used to encrypt messages back to the creator", + "type": "array", + "items": { + "type": "integer" + } + } + } + }, "model.JobShardState": { "type": "object", "properties": { @@ -941,6 +917,52 @@ } } }, + "model.JobStatus": { + "type": "object", + "properties": { + "JobEvents": { + "description": "All events associated with the job", + "type": "array", + "items": { + "$ref": "#/definitions/model.JobEvent" + } + }, + "JobState": { + "description": "The current state of the job", + "$ref": "#/definitions/model.JobState" + }, + "LocalJobEvents": { + "description": "All local events associated with the job", + "type": "array", + "items": { + "$ref": "#/definitions/model.JobLocalEvent" + } + }, + "Requester": { + "$ref": "#/definitions/model.JobRequester" + } + } + }, + "model.Metadata": { + "type": "object", + "properties": { + "ClientID": { + "description": "The ID of the client that created this job.", + "type": "string", + "example": "ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51" + }, + "CreatedAt": { + "description": "Time the job was submitted to the bacalhau network.", + "type": "string", + "example": "2022-11-17T13:29:01.871140291Z" + }, + "ID": { + "description": "The unique global ID of this job in the bacalhau network.", + "type": "string", + "example": "92d5d4ee-3765-4f78-8353-623f5f26df08" + } + } + }, "model.PublishedResult": { "type": "object", "properties": { @@ -1021,6 +1043,10 @@ "$ref": "#/definitions/model.StorageSpec" } }, + "Deal": { + "description": "The deal the client has made, such as which job bids they have accepted.", + "$ref": "#/definitions/model.Deal" + }, "DoNotTrack": { "description": "Do not track specified by the client", "type": "boolean" @@ -1033,6 +1059,10 @@ "description": "e.g. docker or language", "type": "integer" }, + "ExecutionPlan": { + "description": "how will this job be executed by nodes on the network", + "$ref": "#/definitions/model.JobExecutionPlan" + }, "Language": { "$ref": "#/definitions/model.JobSpecLanguage" }, @@ -1239,7 +1269,7 @@ "type": "object", "required": [ "client_public_key", - "data", + "job_create_payload", "signature" ], "properties": { @@ -1247,7 +1277,7 @@ "description": "The base64-encoded public key of the client:", "type": "string" }, - "data": { + "job_create_payload": { "description": "The data needed to submit and run a job on the network:", "$ref": "#/definitions/model.JobCreatePayload" }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 5a8452105b..a110996741 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -52,55 +52,21 @@ definitions: APIVersion: example: V1beta1 type: string - ClientID: - description: The ID of the client that created this job. - example: ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51 - type: string - CreatedAt: - description: Time the job was submitted to the bacalhau network. - example: "2022-11-17T13:29:01.871140291Z" - type: string - Deal: - $ref: '#/definitions/model.Deal' - description: The deal the client has made, such as which job bids they have - accepted. - ExecutionPlan: - $ref: '#/definitions/model.JobExecutionPlan' - description: how will this job be executed by nodes on the network - ID: - description: The unique global ID of this job in the bacalhau network. - example: 92d5d4ee-3765-4f78-8353-623f5f26df08 - type: string - JobEvents: - description: All events associated with the job - items: - $ref: '#/definitions/model.JobEvent' - type: array - JobState: - $ref: '#/definitions/model.JobState' - description: The current state of the job - LocalJobEvents: - description: All local events associated with the job - items: - $ref: '#/definitions/model.JobLocalEvent' - type: array - RequesterNodeID: - description: The ID of the requester node that owns this job. - example: QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF - type: string - RequesterPublicKey: - description: |- - The public key of the Requester node that created this job - This can be used to encrypt messages back to the creator - items: - type: integer - type: array + Metadata: + $ref: '#/definitions/model.Metadata' Spec: $ref: '#/definitions/model.Spec' description: The specification of this job. + Status: + $ref: '#/definitions/model.JobStatus' + description: 'The status of the job: where are the nodes at, what are the + events' type: object model.JobCreatePayload: properties: + APIVersion: + example: V1beta1 + type: string ClientID: description: the id of the client that is submitting the job type: string @@ -110,12 +76,13 @@ definitions: mounted as storage for the job. Not part of the spec so we don't flood the transport layer with it (potentially very large). type: string - Job: - $ref: '#/definitions/model.Job' - description: 'The job specification:' + Spec: + $ref: '#/definitions/model.Spec' + description: The specification of this job. required: + - APIVersion - ClientID - - Job + - Spec type: object model.JobEvent: properties: @@ -204,6 +171,20 @@ definitions: $ref: '#/definitions/model.JobShardState' type: object type: object + model.JobRequester: + properties: + RequesterNodeID: + description: The ID of the requester node that owns this job. + example: QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF + type: string + RequesterPublicKey: + description: |- + The public key of the Requester node that created this job + This can be used to encrypt messages back to the creator + items: + type: integer + type: array + type: object model.JobShardState: properties: NodeId: @@ -333,6 +314,39 @@ definitions: $ref: '#/definitions/model.JobNodeState' type: object type: object + model.JobStatus: + properties: + JobEvents: + description: All events associated with the job + items: + $ref: '#/definitions/model.JobEvent' + type: array + JobState: + $ref: '#/definitions/model.JobState' + description: The current state of the job + LocalJobEvents: + description: All local events associated with the job + items: + $ref: '#/definitions/model.JobLocalEvent' + type: array + Requester: + $ref: '#/definitions/model.JobRequester' + type: object + model.Metadata: + properties: + ClientID: + description: The ID of the client that created this job. + example: ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51 + type: string + CreatedAt: + description: Time the job was submitted to the bacalhau network. + example: "2022-11-17T13:29:01.871140291Z" + type: string + ID: + description: The unique global ID of this job in the bacalhau network. + example: 92d5d4ee-3765-4f78-8353-623f5f26df08 + type: string + type: object model.PublishedResult: properties: Data: @@ -392,6 +406,10 @@ definitions: items: $ref: '#/definitions/model.StorageSpec' type: array + Deal: + $ref: '#/definitions/model.Deal' + description: The deal the client has made, such as which job bids they have + accepted. DoNotTrack: description: Do not track specified by the client type: boolean @@ -401,6 +419,9 @@ definitions: Engine: description: e.g. docker or language type: integer + ExecutionPlan: + $ref: '#/definitions/model.JobExecutionPlan' + description: how will this job be executed by nodes on the network Language: $ref: '#/definitions/model.JobSpecLanguage' Publisher: @@ -563,7 +584,7 @@ definitions: client_public_key: description: 'The base64-encoded public key of the client:' type: string - data: + job_create_payload: $ref: '#/definitions/model.JobCreatePayload' description: 'The data needed to submit and run a job on the network:' signature: @@ -571,7 +592,7 @@ definitions: type: string required: - client_public_key - - data + - job_create_payload - signature type: object publicapi.submitResponse: @@ -1285,20 +1306,11 @@ paths: - application/json description: "Description:\n\n* `client_public_key`: The base64-encoded public key of the client.\n* `signature`: A base64-encoded signature of the `data` - attribute, signed by the client.\n* `data`\n * `ClientID`: Request must - specify a `ClientID`. To retrieve your `ClientID`, you can do the following: - (1) submit a dummy job to Bacalhau (or use one you created before), (2) run - `bacalhau describe ` and fetch the `ClientID` field.\n * `Job`: - see example below.\n\nExample request\n```json\n{\n\t\"data\": {\n\t\t\"ClientID\": - \"ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51\",\n\t\t\"Job\": - {\n\t\t\t\"APIVersion\": \"V1beta1\",\n\t\t\t\"Spec\": {\n\t\t\t\t\"Engine\": - \"Docker\",\n\t\t\t\t\"Verifier\": \"Noop\",\n\t\t\t\t\"Publisher\": \"Estuary\",\n\t\t\t\t\"Docker\": - {\n\t\t\t\t\t\"Image\": \"ubuntu\",\n\t\t\t\t\t\"Entrypoint\": [\n\t\t\t\t\t\t\"date\"\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"Timeout\": - 1800,\n\t\t\t\t\"outputs\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"StorageSource\": - \"IPFS\",\n\t\t\t\t\t\t\"Name\": \"outputs\",\n\t\t\t\t\t\t\"path\": \"/outputs\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"Sharding\": - {\n\t\t\t\t\t\"BatchSize\": 1,\n\t\t\t\t\t\"GlobPatternBasePath\": \"/inputs\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"Deal\": - {\n\t\t\t\t\"Concurrency\": 1\n\t\t\t}\n\t\t}\n\t},\n\t\"signature\": \"...\",\n\t\"client_public_key\": - \"...\"\n}\n```" + attribute, signed by the client.\n* `job_create_payload`:\n * `ClientID`: + Request must specify a `ClientID`. To retrieve your `ClientID`, you can do + the following: (1) submit a dummy job to Bacalhau (or use one you created + before), (2) run `bacalhau describe ` and fetch the `ClientID` field.\n\t* + `APIVersion`: e.g. `\"V1beta1\"`.\n * `Spec`: https://github.com/filecoin-project/bacalhau/blob/main/pkg/model/job.go\n" operationId: pkg/apiServer.submit parameters: - description: ' ' diff --git a/docs/swagger/endpoints_submit.md b/docs/swagger/endpoints_submit.md index d3382128b5..2b59c7b1b2 100644 --- a/docs/swagger/endpoints_submit.md +++ b/docs/swagger/endpoints_submit.md @@ -2,46 +2,7 @@ Description: * `client_public_key`: The base64-encoded public key of the client. * `signature`: A base64-encoded signature of the `data` attribute, signed by the client. -* `data` +* `job_create_payload`: * `ClientID`: Request must specify a `ClientID`. To retrieve your `ClientID`, you can do the following: (1) submit a dummy job to Bacalhau (or use one you created before), (2) run `bacalhau describe ` and fetch the `ClientID` field. - * `Job`: see example below. - -Example request -```json -{ - "data": { - "ClientID": "ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51", - "Job": { - "APIVersion": "V1beta1", - "Spec": { - "Engine": "Docker", - "Verifier": "Noop", - "Publisher": "Estuary", - "Docker": { - "Image": "ubuntu", - "Entrypoint": [ - "date" - ] - }, - "Timeout": 1800, - "outputs": [ - { - "StorageSource": "IPFS", - "Name": "outputs", - "path": "/outputs" - } - ], - "Sharding": { - "BatchSize": 1, - "GlobPatternBasePath": "/inputs" - } - }, - "Deal": { - "Concurrency": 1 - } - } - }, - "signature": "...", - "client_public_key": "..." -} -``` \ No newline at end of file + * `APIVersion`: e.g. `"V1beta1"`. + * `Spec`: https://github.com/filecoin-project/bacalhau/blob/main/pkg/model/job.go diff --git a/ops/aws/canary/lambda/go.mod b/ops/aws/canary/lambda/go.mod index 9cc85eea17..2d2ce070a6 100644 --- a/ops/aws/canary/lambda/go.mod +++ b/ops/aws/canary/lambda/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/aws/aws-lambda-go v1.34.1 github.com/aws/aws-sdk-go v1.44.96 - github.com/filecoin-project/bacalhau v0.3.14-0.20221128044615-86e346d62c04 + github.com/filecoin-project/bacalhau v0.3.14-0.20221208113453-8eebe81eab7f github.com/rs/zerolog v1.28.0 github.com/slack-go/slack v0.11.3 github.com/spf13/pflag v1.0.5 @@ -19,7 +19,6 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/BTBurke/k8sresource v1.2.0 // indirect github.com/KyleBanks/depth v1.2.1 // indirect - github.com/MakeNowJust/heredoc/v2 v2.0.1 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect @@ -36,10 +35,9 @@ require ( github.com/ceramicnetwork/go-dag-jose v0.1.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/chai2010/gettext-go v1.0.2 // indirect github.com/cheggaaa/pb v1.0.29 // indirect github.com/containerd/cgroups v1.0.4 // indirect - github.com/coreos/go-systemd/v22 v22.4.0 // indirect + github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect github.com/cskr/pubsub v1.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -84,7 +82,6 @@ require ( github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/gofuzz v1.1.0 // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect @@ -95,10 +92,7 @@ require ( github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/huin/goupnp v1.0.3 // indirect - github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect github.com/imdario/mergo v0.3.13 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/invopop/jsonschema v0.7.0 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-bitfield v1.0.0 // indirect github.com/ipfs/go-bitswap v0.10.2 // indirect @@ -107,7 +101,7 @@ require ( github.com/ipfs/go-cid v0.3.2 // indirect github.com/ipfs/go-cidutil v0.1.0 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect - github.com/ipfs/go-delegated-routing v0.6.0 // indirect + github.com/ipfs/go-delegated-routing v0.7.0 // indirect github.com/ipfs/go-ds-badger v0.3.0 // indirect github.com/ipfs/go-ds-flatfs v0.5.1 // indirect github.com/ipfs/go-ds-leveldb v0.5.0 // indirect @@ -140,7 +134,7 @@ require ( github.com/ipfs/go-ipns v0.3.0 // indirect github.com/ipfs/go-log v1.0.5 // indirect github.com/ipfs/go-log/v2 v2.5.1 // indirect - github.com/ipfs/go-merkledag v0.8.0 // indirect + github.com/ipfs/go-merkledag v0.8.1 // indirect github.com/ipfs/go-metrics-interface v0.0.1 // indirect github.com/ipfs/go-mfs v0.2.1 // indirect github.com/ipfs/go-namesys v0.5.0 // indirect @@ -151,7 +145,7 @@ require ( github.com/ipfs/go-unixfsnode v1.5.0 // indirect github.com/ipfs/go-verifcid v0.0.2 // indirect github.com/ipfs/interface-go-ipfs-core v0.7.0 // indirect - github.com/ipfs/kubo v0.16.0 // indirect + github.com/ipfs/kubo v0.17.0 // indirect github.com/ipfs/tar-utils v0.0.2 // indirect github.com/ipld/edelweiss v0.2.0 // indirect github.com/ipld/go-car v0.4.0 // indirect @@ -161,19 +155,17 @@ require ( github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect - github.com/jedib0t/go-pretty/v6 v6.4.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/joho/godotenv v1.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.15.10 // indirect - github.com/klauspost/cpuid/v2 v2.1.1 // indirect + github.com/klauspost/compress v1.15.12 // indirect + github.com/klauspost/cpuid/v2 v2.1.2 // indirect github.com/koron/go-ssdp v0.0.3 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-cidranger v1.1.0 // indirect github.com/libp2p/go-doh-resolver v0.4.0 // indirect github.com/libp2p/go-flow-metrics v0.1.0 // indirect - github.com/libp2p/go-libp2p v0.23.3 // indirect + github.com/libp2p/go-libp2p v0.23.4 // indirect github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect github.com/libp2p/go-libp2p-core v0.20.1 // indirect github.com/libp2p/go-libp2p-gostream v0.3.0 // indirect @@ -188,7 +180,7 @@ require ( github.com/libp2p/go-mplex v0.7.0 // indirect github.com/libp2p/go-msgio v0.2.0 // indirect github.com/libp2p/go-nat v0.1.0 // indirect - github.com/libp2p/go-netroute v0.2.0 // indirect + github.com/libp2p/go-netroute v0.2.1 // indirect github.com/libp2p/go-openssl v0.1.0 // indirect github.com/libp2p/go-reuseport v0.2.0 // indirect github.com/libp2p/go-yamux/v4 v4.0.0 // indirect @@ -197,16 +189,16 @@ require ( github.com/lukemarsden/golang-mutex-tracer v0.0.0-20220819104156-4bfc74eba994 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/marten-seemann/qpack v0.2.1 // indirect - github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect - github.com/marten-seemann/qtls-go1-19 v0.1.0 // indirect + github.com/marten-seemann/qpack v0.3.0 // indirect + github.com/marten-seemann/qtls-go1-18 v0.1.3 // indirect + github.com/marten-seemann/qtls-go1-19 v0.1.1 // indirect github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect github.com/marten-seemann/webtransport-go v0.1.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-pointer v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect github.com/miekg/dns v1.1.50 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect @@ -214,17 +206,13 @@ require ( github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moby/spdystream v0.2.0 // indirect github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.1.0 // indirect - github.com/multiformats/go-multiaddr v0.7.0 // indirect + github.com/multiformats/go-multiaddr v0.8.0 // indirect github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect github.com/multiformats/go-multibase v0.1.1 // indirect @@ -242,7 +230,7 @@ require ( github.com/openzipkin/zipkin-go v0.4.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 // indirect github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -257,13 +245,11 @@ require ( github.com/ricochet2200/go-disk-usage/du v0.0.0-20210707232629-ac9918953285 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rs/cors v1.7.0 // indirect - github.com/russross/blackfriday v1.6.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.9.2 // indirect github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.6.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/viper v1.14.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect @@ -272,12 +258,7 @@ require ( github.com/swaggo/swag v1.8.7 // indirect github.com/syndtr/goleveldb v1.0.0 // indirect github.com/tetratelabs/wazero v1.0.0-pre.4 // indirect - github.com/tidwall/gjson v1.14.2 // indirect - github.com/tidwall/match v1.1.1 // indirect - github.com/tidwall/pretty v1.2.0 // indirect - github.com/tidwall/sjson v1.2.5 // indirect github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb // indirect - github.com/wI2L/jsondiff v0.2.0 // indirect github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 // indirect github.com/whyrusleeping/cbor-gen v0.0.0-20220514204315-f29c37e9c44c // indirect @@ -286,9 +267,6 @@ require ( github.com/whyrusleeping/go-sysinfo v0.0.0-20190219211824-4a357d4b90b1 // indirect github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 // indirect github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4 // indirect go.opentelemetry.io/otel v1.11.1 // indirect @@ -308,7 +286,7 @@ require ( go.uber.org/dig v1.14.1 // indirect go.uber.org/fx v1.17.1 // indirect go.uber.org/multierr v1.8.0 // indirect - go.uber.org/zap v1.23.0 // indirect + go.uber.org/zap v1.24.0 // indirect go4.org v0.0.0-20201209231011-d4a079459e60 // indirect golang.org/x/crypto v0.1.0 // indirect golang.org/x/exp v0.0.0-20221106115401-f9659909a136 // indirect @@ -317,29 +295,18 @@ require ( golang.org/x/oauth2 v0.1.0 // indirect golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.2.0 // indirect - golang.org/x/term v0.2.0 // indirect golang.org/x/text v0.4.0 // indirect - golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect golang.org/x/tools v0.3.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-20221024183307-1bc688fe9f3e // indirect - google.golang.org/grpc v1.50.1 // indirect + google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/square/go-jose.v2 v2.5.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.25.3 // indirect - k8s.io/apimachinery v0.25.3 // indirect - k8s.io/client-go v0.25.3 // indirect - k8s.io/klog/v2 v2.70.1 // indirect - k8s.io/kubectl v0.25.3 // indirect - k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect lukechampine.com/blake3 v1.1.7 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/ops/aws/canary/lambda/go.sum b/ops/aws/canary/lambda/go.sum index e5010b8c82..5d94757fd8 100644 --- a/ops/aws/canary/lambda/go.sum +++ b/ops/aws/canary/lambda/go.sum @@ -62,8 +62,6 @@ github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y= github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= -github.com/MakeNowJust/heredoc/v2 v2.0.1 h1:rlCHh70XXXv7toz95ajQWOWQnN4WNLt0TdpZYIR/J6A= -github.com/MakeNowJust/heredoc/v2 v2.0.1/go.mod h1:6/2Abh5s+hc3g9nbWLe9ObDIOhaRrqsyY9MWy+4JdRM= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= @@ -98,7 +96,6 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-lambda-go v1.34.1 h1:M3a/uFYBjii+tDcOJ0wL/WyFi2550FHoECdPf27zvOs= @@ -157,8 +154,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= -github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo= github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= @@ -192,13 +187,12 @@ github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU= -github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -252,10 +246,8 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/4= github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elgris/jsondiff v0.0.0-20160530203242-765b5c24c302 h1:QV0ZrfBLpFc2KDk+a4LJefDczXnonRwrYrQJY/9L4dA= github.com/elgris/jsondiff v0.0.0-20160530203242-765b5c24c302/go.mod h1:qBlWZqWeVx9BjvqBsnC/8RUlAYpIFmPvgROcw0n1scE= -github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= 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= @@ -273,8 +265,8 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/filecoin-project/bacalhau v0.3.14-0.20221128044615-86e346d62c04 h1:pT5dwYLCmcFt/I5S6BVgwo9GGIg6IqMuTmVAvZTqJsI= -github.com/filecoin-project/bacalhau v0.3.14-0.20221128044615-86e346d62c04/go.mod h1:up3RZJwitl4VbfD481oof2TeppQdj8XPqX3xYIbWKQs= +github.com/filecoin-project/bacalhau v0.3.14-0.20221208113453-8eebe81eab7f h1:x6hpLvVfOXzqYT9LSBqtWb6ihKC+61QwrcM8FE7LiA8= +github.com/filecoin-project/bacalhau v0.3.14-0.20221208113453-8eebe81eab7f/go.mod h1:qHfQ0wZsKaqohkFtQXXT2k9NE+WgA8SSH10FSg3i4BY= github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200910194244-f640612a1a1f/go.mod h1:+If3s2VxyjZn+KGGZIoRXBDSFQ9xL404JBJGf4WhEj0= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-address v0.0.5/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= @@ -342,9 +334,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -426,7 +416,6 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -444,8 +433,6 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= @@ -541,18 +528,13 @@ github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSa github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= -github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/invopop/jsonschema v0.7.0 h1:2vgQcBz1n256N+FpX3Jq7Y17AjYt46Ig3zIWyy770So= -github.com/invopop/jsonschema v0.7.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= @@ -605,8 +587,8 @@ github.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk= github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8= -github.com/ipfs/go-delegated-routing v0.6.0 h1:+M1siyTB2H4mHzEnbWjepQxlmKbapVWdbYLexSDODpg= -github.com/ipfs/go-delegated-routing v0.6.0/go.mod h1:FJjhCChfcWK9z6OXo2jwKKJoxq1JlEWG7YTvwaA7UbI= +github.com/ipfs/go-delegated-routing v0.7.0 h1:43FyMnKA+8XnyX68Fwg6aoGkqrf8NS5aG7p644s26PU= +github.com/ipfs/go-delegated-routing v0.7.0/go.mod h1:u4zxjUWIe7APUW5ds9CfD0tJX3vM9JhIeNqA8kE4vHE= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= @@ -736,8 +718,8 @@ github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= github.com/ipfs/go-merkledag v0.5.1/go.mod h1:cLMZXx8J08idkp5+id62iVftUQV+HlYJ3PIhDfZsjA4= github.com/ipfs/go-merkledag v0.6.0/go.mod h1:9HSEwRd5sV+lbykiYP+2NC/3o6MZbKNaa4hfNcH5iH0= -github.com/ipfs/go-merkledag v0.8.0 h1:ZUda+sh/MGZX4Z13DE/VQT4GmKWm4H95Nje4qcL/yPE= -github.com/ipfs/go-merkledag v0.8.0/go.mod h1:/RmH1kOs7qDMNtGKPh4d/UErNMVuAMpPS/tP57a3aoY= +github.com/ipfs/go-merkledag v0.8.1 h1:N3yrqSre/ffvdwtHL4MXy0n7XH+VzN8DlzDrJySPa94= +github.com/ipfs/go-merkledag v0.8.1/go.mod h1:uYUlWE34GhbcTjGuUDEcdPzsEtOdnOupL64NgSRjmWI= github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-mfs v0.2.1 h1:5jz8+ukAg/z6jTkollzxGzhkl3yxm022Za9f2nL5ab8= @@ -774,8 +756,8 @@ github.com/ipfs/interface-go-ipfs-core v0.7.0 h1:7tb+2upz8oCcjIyjo1atdMk+P+u7wPm github.com/ipfs/interface-go-ipfs-core v0.7.0/go.mod h1:lF27E/nnSPbylPqKVXGZghal2hzifs3MmjyiEjnc9FY= github.com/ipfs/iptb v1.4.0 h1:YFYTrCkLMRwk/35IMyC6+yjoQSHTEcNcefBStLJzgvo= github.com/ipfs/iptb-plugins v0.3.0 h1:C1rpq1o5lUZtaAOkLIox5akh6ba4uk/3RwWc6ttVxw0= -github.com/ipfs/kubo v0.16.0 h1:goK1zdbHHTYVczj20BvAoA6PWiYvBdDgk8zDH+bKwUs= -github.com/ipfs/kubo v0.16.0/go.mod h1:mkYGiXL+oi2TCkbUwaDSiOuqvLORuUfnDadIL6GWQIQ= +github.com/ipfs/kubo v0.17.0 h1:SioyKL7+RF5RNAA3GYJhqA3fk5AhbRMw5VuKyx+RfQI= +github.com/ipfs/kubo v0.17.0/go.mod h1:K44dUcIpAxO1jEVw/53e3vbUaMaIi35CWq1Mz7puqMw= github.com/ipfs/tar-utils v0.0.2 h1:UNgHB4x/PPzbMkmJi+7EqC9LNMPDztOVSnx1HAqSNg4= github.com/ipfs/tar-utils v0.0.2/go.mod h1:4qlnRWgTVljIMhSG2SqRYn66NT+3wrv/kZt9V+eqxDM= github.com/ipld/edelweiss v0.2.0 h1:KfAZBP8eeJtrLxLhi7r3N0cBCo7JmwSRhOJp3WSpNjk= @@ -823,8 +805,6 @@ github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/U github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= -github.com/jedib0t/go-pretty/v6 v6.4.2 h1:DcJNSNIb1E17Tvy9w9S7z+sExvWvvjNbFdyr6C+FUL0= -github.com/jedib0t/go-pretty/v6 v6.4.2/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -845,7 +825,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -862,13 +841,13 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo= -github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM= +github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.1.1 h1:t0wUqjowdm8ezddV5k0tLWVklVuvLJpoHeb4WBdydm0= -github.com/klauspost/cpuid/v2 v2.1.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.1.2 h1:XhdX4fqAJUA0yj+kUwMavO0hHrSPAecYdYf1ZmxHvak= +github.com/klauspost/cpuid/v2 v2.1.2/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= @@ -925,8 +904,8 @@ github.com/libp2p/go-libp2p v0.13.0/go.mod h1:pM0beYdACRfHO1WcJlp65WXyG2A6NqYM+t github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0= github.com/libp2p/go-libp2p v0.14.4/go.mod h1:EIRU0Of4J5S8rkockZM7eJp2S0UrCyi55m2kJVru3rM= github.com/libp2p/go-libp2p v0.16.0/go.mod h1:ump42BsirwAWxKzsCiFnTtN1Yc+DuPu76fyMX364/O4= -github.com/libp2p/go-libp2p v0.23.3 h1:/n3i0VtJF0iZ9YMUxl/teOY3h+M8NfgaCjOSYr9D+uI= -github.com/libp2p/go-libp2p v0.23.3/go.mod h1:s9DEa5NLR4g+LZS+md5uGU4emjMWFiqkZr6hBTY8UxI= +github.com/libp2p/go-libp2p v0.23.4 h1:hWi9XHSOVFR1oDWRk7rigfyA4XNMuYL20INNybP9LP8= +github.com/libp2p/go-libp2p v0.23.4/go.mod h1:s9DEa5NLR4g+LZS+md5uGU4emjMWFiqkZr6hBTY8UxI= github.com/libp2p/go-libp2p-asn-util v0.0.0-20200825225859-85005c6cf052/go.mod h1:nRMRTab+kZuk0LnKZpxhOVH/ndsdr2Nr//Zltc/vwgo= github.com/libp2p/go-libp2p-asn-util v0.1.0/go.mod h1:wu+AnM9Ii2KgO5jMmS1rz9dvzTdj8BXqsPR9HR0XB7I= github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw= @@ -1155,8 +1134,8 @@ github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdm github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= github.com/libp2p/go-netroute v0.1.5/go.mod h1:V1SR3AaECRkEQCoFFzYwVYWvYIEtlxx89+O3qcpCl4A= github.com/libp2p/go-netroute v0.1.6/go.mod h1:AqhkMh0VuWmfgtxKPp3Oc1LdU5QSWS7wl0QLhSZqXxQ= -github.com/libp2p/go-netroute v0.2.0 h1:0FpsbsvuSnAhXFnCY0VLFbJOzaK0VnP0r1QT/o4nWRE= -github.com/libp2p/go-netroute v0.2.0/go.mod h1:Vio7LTzZ+6hoT4CMZi5/6CpY3Snzh2vgZhWgxMNwlQI= +github.com/libp2p/go-netroute v0.2.1 h1:V8kVrpD8GK0Riv15/7VN6RbUQ3URNZVosw7H2v9tksU= +github.com/libp2p/go-netroute v0.2.1/go.mod h1:hraioZr0fhBjG0ZRXJJ6Zj2IVEVNx6tDTFQfSmcq7mQ= github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= @@ -1239,8 +1218,9 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/marten-seemann/qpack v0.2.1 h1:jvTsT/HpCn2UZJdP+UUB53FfUUgeOyG5K1ns0OJOGVs= github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= +github.com/marten-seemann/qpack v0.3.0 h1:UiWstOgT8+znlkDPOg2+3rIuYXJ2CnGDkGUXN6ki6hE= +github.com/marten-seemann/qpack v0.3.0/go.mod h1:cGfKPBiP4a9EQdxCwEwI/GEeWAsjSekBvx/X8mh58+g= github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= github.com/marten-seemann/qtls-go1-15 v0.1.1/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= github.com/marten-seemann/qtls-go1-15 v0.1.4/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= @@ -1248,10 +1228,10 @@ github.com/marten-seemann/qtls-go1-15 v0.1.5/go.mod h1:GyFwywLKkRt+6mfU99csTEY1j github.com/marten-seemann/qtls-go1-16 v0.1.4/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= github.com/marten-seemann/qtls-go1-17 v0.1.0-rc.1/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= github.com/marten-seemann/qtls-go1-17 v0.1.0/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= -github.com/marten-seemann/qtls-go1-18 v0.1.2 h1:JH6jmzbduz0ITVQ7ShevK10Av5+jBEKAHMntXmIV7kM= -github.com/marten-seemann/qtls-go1-18 v0.1.2/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= -github.com/marten-seemann/qtls-go1-19 v0.1.0 h1:rLFKD/9mp/uq1SYGYuVZhm83wkmU95pK5df3GufyYYU= -github.com/marten-seemann/qtls-go1-19 v0.1.0/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= +github.com/marten-seemann/qtls-go1-18 v0.1.3 h1:R4H2Ks8P6pAtUagjFty2p7BVHn3XiwDAl7TTQf5h7TI= +github.com/marten-seemann/qtls-go1-18 v0.1.3/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= +github.com/marten-seemann/qtls-go1-19 v0.1.1 h1:mnbxeq3oEyQxQXwI4ReCgW9DPoPR94sNlqWoDZnjRIE= +github.com/marten-seemann/qtls-go1-19 v0.1.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk= github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd/go.mod h1:QuCEs1Nt24+FYQEqAAncTDPJIuGs+LxK1MCiFL25pMU= github.com/marten-seemann/webtransport-go v0.1.1 h1:TnyKp3pEXcDooTaNn4s9dYpMJ7kMnTp7k5h+SgYP/mc= @@ -1279,8 +1259,8 @@ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= @@ -1312,24 +1292,18 @@ github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= -github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= 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= @@ -1356,8 +1330,8 @@ github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4 github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= -github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= -github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= +github.com/multiformats/go-multiaddr v0.8.0 h1:aqjksEcqK+iD/Foe1RRFsGZh8+XFiGo7FgUCZlpv3LU= +github.com/multiformats/go-multiaddr v0.8.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= @@ -1411,7 +1385,6 @@ github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXS github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/n-marshall/go-cp v0.0.0-20180115193924-61436d3b7cfa h1:cHWBhAbWYxzxHdl1kD41n4LPuydyoIHOOo82qqRsP4g= @@ -1442,6 +1415,7 @@ github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvw github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.5.0 h1:TRtrvv2vdQqzkwrQ1ke6vtXf7IK34RBUJafIy1wMwls= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1450,7 +1424,7 @@ github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= +github.com/onsi/gomega v1.24.0 h1:+0glovB9Jd6z3VR+ScSwQqXVTIfJcGA9UBM8yzQxhqg= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1480,8 +1454,8 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 h1:1/WtZae0yGtPq+TI6+Tv1WTxkukpXeMlviSxvL7SRgk= github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9/go.mod h1:x3N5drFsm2uilKKuuYo6LdyD8vZAW55sH/9w+pbo1sw= @@ -1495,7 +1469,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1575,10 +1548,7 @@ github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= -github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -1637,7 +1607,6 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -1646,7 +1615,6 @@ github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155 github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1668,13 +1636,11 @@ 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/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.3.1-0.20190311161405-34c6fa2dc709/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.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= @@ -1692,14 +1658,6 @@ github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cb github.com/tetratelabs/wazero v1.0.0-pre.4 h1:RBJQT5OzmORkSp6MmZDWoFEr0zXjk4pmvMKAdeUnsaI= github.com/tetratelabs/wazero v1.0.0-pre.4/go.mod h1:u8wrFmpdrykiFK0DFPiFm5a4+0RzsdmXYVtijBKqUVo= github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g= -github.com/tidwall/gjson v1.14.2 h1:6BBkirS0rAHjumnjHF6qgy5d2YAJ1TLIaFE2lzfOLqo= -github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= -github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1715,8 +1673,6 @@ github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2 github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= -github.com/wI2L/jsondiff v0.2.0 h1:dE00WemBa1uCjrzQUUTE/17I6m5qAaN0EMFOg2Ynr/k= -github.com/wI2L/jsondiff v0.2.0/go.mod h1:axTcwtBkY4TsKuV+RgoMhHyHKKFRI6nnjRLi8LLYQnA= github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE= github.com/warpfork/go-testmark v0.3.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= github.com/warpfork/go-testmark v0.9.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= @@ -1761,12 +1717,6 @@ github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7V github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/c-for-go v0.0.0-20200718154222-87b0065af829/go.mod h1:h/1PEBwj7Ym/8kOuMWvO2ujZ6Lt+TMbySEXNhjjR87I= github.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk= @@ -1868,8 +1818,8 @@ go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= -go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= go4.org v0.0.0-20201209231011-d4a079459e60 h1:iqAGo78tVOJXELHQFRjR6TMwItrvXH4hrGJ32I/NFF8= @@ -2156,8 +2106,6 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2174,7 +2122,6 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2358,8 +2305,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= 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= @@ -2387,7 +2334,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -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.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -2427,20 +2373,6 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -k8s.io/api v0.25.3 h1:Q1v5UFfYe87vi5H7NU0p4RXC26PPMT8KOpr1TLQbCMQ= -k8s.io/api v0.25.3/go.mod h1:o42gKscFrEVjHdQnyRenACrMtbuJsVdP+WVjqejfzmI= -k8s.io/apimachinery v0.25.3 h1:7o9ium4uyUOM76t6aunP0nZuex7gDf8VGwkR5RcJnQc= -k8s.io/apimachinery v0.25.3/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= -k8s.io/client-go v0.25.3 h1:oB4Dyl8d6UbfDHD8Bv8evKylzs3BXzzufLiO27xuPs0= -k8s.io/client-go v0.25.3/go.mod h1:t39LPczAIMwycjcXkVc+CB+PZV69jQuNx4um5ORDjQA= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= -k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= -k8s.io/kubectl v0.25.3 h1:HnWJziEtmsm4JaJiKT33kG0kadx68MXxUE8UEbXnN4U= -k8s.io/kubectl v0.25.3/go.mod h1:glU7PiVj/R6Ud4A9FJdTcJjyzOtCJyc0eO7Mrbh3jlI= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= @@ -2454,10 +2386,6 @@ pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/ops/aws/canary/lambda/pkg/scenarios/list.go b/ops/aws/canary/lambda/pkg/scenarios/list.go index fc9bab46ff..e82b8c7442 100644 --- a/ops/aws/canary/lambda/pkg/scenarios/list.go +++ b/ops/aws/canary/lambda/pkg/scenarios/list.go @@ -2,15 +2,14 @@ package scenarios import ( "context" - "github.com/rs/zerolog/log" - "github.com/filecoin-project/bacalhau/cmd/bacalhau" + "github.com/rs/zerolog/log" ) func List(ctx context.Context) error { // intentionally delay creation of the client so a new client is created for each // scenario to mimic the behavior of bacalhau cli. - client := bacalhau.GetAPIClient() + client := getClient() jobs, err := client.List(ctx, "", 10, false, "created_at", true) if err != nil { diff --git a/ops/aws/canary/lambda/pkg/scenarios/submit.go b/ops/aws/canary/lambda/pkg/scenarios/submit.go index 6d1f6f467c..bbc71f41de 100644 --- a/ops/aws/canary/lambda/pkg/scenarios/submit.go +++ b/ops/aws/canary/lambda/pkg/scenarios/submit.go @@ -3,14 +3,13 @@ package scenarios import ( "context" - "github.com/filecoin-project/bacalhau/cmd/bacalhau" "github.com/rs/zerolog/log" ) func Submit(ctx context.Context) error { // intentionally delay creation of the client so a new client is created for each // scenario to mimic the behavior of bacalhau cli. - client := bacalhau.GetAPIClient() + client := getClient() j := getSampleDockerJob() submittedJob, err := client.Submit(ctx, j, nil) @@ -18,7 +17,7 @@ func Submit(ctx context.Context) error { return err } - log.Info().Msgf("submitted job: %s", submittedJob.ID) + log.Info().Msgf("submitted job: %s", submittedJob.Metadata.ID) err = waitUntilCompleted(ctx, client, submittedJob) if err != nil { diff --git a/ops/aws/canary/lambda/pkg/scenarios/submitAndDescribe.go b/ops/aws/canary/lambda/pkg/scenarios/submitAndDescribe.go index eaf233688d..eaf72b654a 100644 --- a/ops/aws/canary/lambda/pkg/scenarios/submitAndDescribe.go +++ b/ops/aws/canary/lambda/pkg/scenarios/submitAndDescribe.go @@ -4,7 +4,6 @@ import ( "context" "fmt" - "github.com/filecoin-project/bacalhau/cmd/bacalhau" "github.com/rs/zerolog/log" ) @@ -14,7 +13,7 @@ import ( func SubmitAnDescribe(ctx context.Context) error { // intentionally delay creation of the client so a new client is created for each // scenario to mimic the behavior of bacalhau cli. - client := bacalhau.GetAPIClient() + client := getClient() j := getSampleDockerJob() submittedJob, err := client.Submit(ctx, j, nil) @@ -22,27 +21,27 @@ func SubmitAnDescribe(ctx context.Context) error { return err } - log.Info().Msgf("submitted job: %s", submittedJob.ID) + log.Info().Msgf("submitted job: %s", submittedJob.Metadata.ID) - _, ok, err := client.Get(ctx, submittedJob.ID) + _, ok, err := client.Get(ctx, submittedJob.Metadata.ID) if err != nil { return err } if !ok { - return fmt.Errorf("job not found matching id: %s", submittedJob.ID) + return fmt.Errorf("job not found matching id: %s", submittedJob.Metadata.ID) } - _, err = client.GetJobState(ctx, submittedJob.ID) + _, err = client.GetJobState(ctx, submittedJob.Metadata.ID) if err != nil { return err } - _, err = client.GetEvents(ctx, submittedJob.ID) + _, err = client.GetEvents(ctx, submittedJob.Metadata.ID) if err != nil { return err } - _, err = client.GetLocalEvents(ctx, submittedJob.ID) + _, err = client.GetLocalEvents(ctx, submittedJob.Metadata.ID) if err != nil { return err } diff --git a/ops/aws/canary/lambda/pkg/scenarios/submitAndGet.go b/ops/aws/canary/lambda/pkg/scenarios/submitAndGet.go index 1ae72790c6..5791b53cd9 100644 --- a/ops/aws/canary/lambda/pkg/scenarios/submitAndGet.go +++ b/ops/aws/canary/lambda/pkg/scenarios/submitAndGet.go @@ -6,7 +6,6 @@ import ( "os" "path/filepath" - "github.com/filecoin-project/bacalhau/cmd/bacalhau" "github.com/filecoin-project/bacalhau/pkg/ipfs" "github.com/filecoin-project/bacalhau/pkg/system" "github.com/rs/zerolog/log" @@ -15,7 +14,7 @@ import ( func SubmitAndGet(ctx context.Context) error { // intentionally delay creation of the client so a new client is created for each // scenario to mimic the behavior of bacalhau cli. - client := bacalhau.GetAPIClient() + client := getClient() cm := system.NewCleanupManager() j := getSampleDockerJob() @@ -24,14 +23,14 @@ func SubmitAndGet(ctx context.Context) error { return err } - log.Info().Msgf("submitted job: %s", submittedJob.ID) + log.Info().Msgf("submitted job: %s", submittedJob.Metadata.ID) err = waitUntilCompleted(ctx, client, submittedJob) if err != nil { return err } - results, err := client.GetResults(ctx, submittedJob.ID) + results, err := client.GetResults(ctx, submittedJob.Metadata.ID) if err != nil { return err } diff --git a/ops/aws/canary/lambda/pkg/scenarios/submitDockerIPFSJobAndGet.go b/ops/aws/canary/lambda/pkg/scenarios/submitDockerIPFSJobAndGet.go index 5b82cb3db0..c8765c747f 100644 --- a/ops/aws/canary/lambda/pkg/scenarios/submitDockerIPFSJobAndGet.go +++ b/ops/aws/canary/lambda/pkg/scenarios/submitDockerIPFSJobAndGet.go @@ -6,32 +6,36 @@ import ( "os" "path/filepath" - "github.com/filecoin-project/bacalhau/cmd/bacalhau" "github.com/filecoin-project/bacalhau/pkg/ipfs" "github.com/filecoin-project/bacalhau/pkg/system" "github.com/rs/zerolog/log" ) // This test submits a job that uses the Docker executor with an IPFS input. -// func SubmitDockerIPFSJobAndGet(ctx context.Context) error { - client := bacalhau.GetAPIClient() + client := getClient() cm := system.NewCleanupManager() j := getSampleDockerIPFSJob() + + // Tests use the cid of the file we uploaded in scenarios_test.go + if system.GetEnvironment() == system.EnvironmentTest { + j.Spec.Inputs[0].CID = os.Getenv("BACALHAU_CANARY_TEST_CID") + } + submittedJob, err := client.Submit(ctx, j, nil) if err != nil { return err } - log.Info().Msgf("submitted job: %s", submittedJob.ID) + log.Info().Msgf("submitted job: %s", submittedJob.Metadata.ID) err = waitUntilCompleted(ctx, client, submittedJob) if err != nil { return fmt.Errorf("waiting until completed: %s", err) } - results, err := client.GetResults(ctx, submittedJob.ID) + results, err := client.GetResults(ctx, submittedJob.Metadata.ID) if err != nil { return fmt.Errorf("getting results: %s", err) } @@ -72,7 +76,13 @@ func SubmitDockerIPFSJobAndGet(ctx context.Context) error { if err != nil { return err } - err = compareOutput(body, "ea1efa312267e09809ae13f311970863 /inputs/data.tar.gz") + + // Tests use the checksum of the data we uploaded in scenarios_test.go + if system.GetEnvironment() == system.EnvironmentProd { + err = compareOutput(body, "ea1efa312267e09809ae13f311970863 /inputs/data.tar.gz") + } else if system.GetEnvironment() == system.EnvironmentTest { + err = compareOutput(body, "c639efc1e98762233743a75e7798dd9c /inputs/data.tar.gz") + } if err != nil { return fmt.Errorf("testing md5 of input: %s", err) } @@ -80,7 +90,12 @@ func SubmitDockerIPFSJobAndGet(ctx context.Context) error { if err != nil { return err } - err = compareOutput(body, "62731802") + // Tests use the stat of the data we uploaded in scenarios_test.go + if system.GetEnvironment() == system.EnvironmentProd { + err = compareOutput(body, "62731802") + } else if system.GetEnvironment() == system.EnvironmentTest { + err = compareOutput(body, "21") + } if err != nil { return fmt.Errorf("testing ls of input: %s", err) } diff --git a/ops/aws/canary/lambda/pkg/scenarios/submitWithConcurrency.go b/ops/aws/canary/lambda/pkg/scenarios/submitWithConcurrency.go index 8a924c195f..c231221ad9 100644 --- a/ops/aws/canary/lambda/pkg/scenarios/submitWithConcurrency.go +++ b/ops/aws/canary/lambda/pkg/scenarios/submitWithConcurrency.go @@ -3,23 +3,22 @@ package scenarios import ( "context" - "github.com/filecoin-project/bacalhau/cmd/bacalhau" "github.com/rs/zerolog/log" ) func SubmitWithConcurrency(ctx context.Context) error { // intentionally delay creation of the client so a new client is created for each // scenario to mimic the behavior of bacalhau cli. - client := bacalhau.GetAPIClient() + client := getClient() j := getSampleDockerJob() - j.Deal.Concurrency = 3 + j.Spec.Deal.Concurrency = 3 submittedJob, err := client.Submit(ctx, j, nil) if err != nil { return err } - log.Info().Msgf("submitted job: %s", submittedJob.ID) + log.Info().Msgf("submitted job: %s", submittedJob.Metadata.ID) err = waitUntilCompleted(ctx, client, submittedJob) if err != nil { diff --git a/ops/aws/canary/lambda/pkg/scenarios/utils.go b/ops/aws/canary/lambda/pkg/scenarios/utils.go index 452f4129af..cbdf412737 100644 --- a/ops/aws/canary/lambda/pkg/scenarios/utils.go +++ b/ops/aws/canary/lambda/pkg/scenarios/utils.go @@ -7,17 +7,21 @@ import ( "os" "strings" + "github.com/filecoin-project/bacalhau/pkg/config" "github.com/filecoin-project/bacalhau/pkg/ipfs" "github.com/filecoin-project/bacalhau/pkg/job" "github.com/filecoin-project/bacalhau/pkg/model" "github.com/filecoin-project/bacalhau/pkg/publicapi" "github.com/filecoin-project/bacalhau/pkg/system" + "github.com/rs/zerolog/log" ) const defaultEchoMessage = "hello λ!" func getSampleDockerJob() *model.Job { - var j = &model.Job{} + var j = &model.Job{ + APIVersion: model.APIVersionLatest().String(), + } j.Spec = model.Spec{ Engine: model.EngineDocker, Verifier: model.VerifierNoop, @@ -31,14 +35,16 @@ func getSampleDockerJob() *model.Job { }, } - j.Deal = model.Deal{ + j.Spec.Deal = model.Deal{ Concurrency: 1, } return j } func getSampleDockerIPFSJob() *model.Job { - var j = &model.Job{} + var j = &model.Job{ + APIVersion: model.APIVersionLatest().String(), + } j.Spec = model.Spec{ Engine: model.EngineDocker, Verifier: model.VerifierNoop, @@ -70,7 +76,7 @@ func getSampleDockerIPFSJob() *model.Job { }, } - j.Deal = model.Deal{ + j.Spec.Deal = model.Deal{ Concurrency: 1, } return j @@ -81,11 +87,30 @@ func getIPFSDownloadSettings() (*ipfs.IPFSDownloadSettings, error) { if err != nil { return nil, err } - return &ipfs.IPFSDownloadSettings{ - TimeoutSecs: 60, - OutputDir: dir, - IPFSSwarmAddrs: strings.Join(system.Envs[system.Production].IPFSSwarmAddresses, ","), - }, nil + + var downloadSettings *ipfs.IPFSDownloadSettings + switch system.GetEnvironment() { + case system.EnvironmentProd: + downloadSettings = &ipfs.IPFSDownloadSettings{ + TimeoutSecs: 60, + OutputDir: dir, + IPFSSwarmAddrs: strings.Join(system.Envs[system.Production].IPFSSwarmAddresses, ","), + } + case system.EnvironmentTest: + if os.Getenv("BACALHAU_IPFS_SWARM_ADDRESSES") != "" { + downloadSettings = &ipfs.IPFSDownloadSettings{ + TimeoutSecs: 60, + OutputDir: dir, + IPFSSwarmAddrs: os.Getenv("BACALHAU_IPFS_SWARM_ADDRESSES"), + } + } + case system.EnvironmentDev: + log.Warn().Msg("Development environment has no download settings attached") + case system.EnvironmentStaging: + log.Warn().Msg("Staging environment has no download settings attached") + } + + return downloadSettings, nil } func waitUntilCompleted(ctx context.Context, client *publicapi.APIClient, submittedJob *model.Job) error { @@ -93,7 +118,7 @@ func waitUntilCompleted(ctx context.Context, client *publicapi.APIClient, submit totalShards := job.GetJobTotalExecutionCount(submittedJob) return resolver.Wait( ctx, - submittedJob.ID, + submittedJob.Metadata.ID, totalShards, job.WaitThrowErrors([]model.JobStateType{ model.JobStateError, @@ -131,3 +156,16 @@ func osReadDir(root string) ([]string, error) { } return files, nil } + +func getClient() *publicapi.APIClient { + apiHost := config.GetAPIHost() + apiPort := config.GetAPIPort() + if apiHost == "" { + apiHost = system.Envs[system.Production].APIHost + } + if apiPort == "" { + apiPort = fmt.Sprint(system.Envs[system.Production].APIPort) + } + client := publicapi.NewAPIClient(fmt.Sprintf("http://%s:%s", apiHost, apiPort)) + return client +} diff --git a/ops/aws/canary/lambda/pkg/test/scenarios_test.go b/ops/aws/canary/lambda/pkg/test/scenarios_test.go index f4e5e2eec3..21db0922df 100644 --- a/ops/aws/canary/lambda/pkg/test/scenarios_test.go +++ b/ops/aws/canary/lambda/pkg/test/scenarios_test.go @@ -4,10 +4,12 @@ import ( "context" "fmt" "os" + "strings" "testing" "github.com/filecoin-project/bacalhau/ops/aws/canary/pkg/models" "github.com/filecoin-project/bacalhau/ops/aws/canary/pkg/router" + "github.com/filecoin-project/bacalhau/pkg/ipfs" "github.com/filecoin-project/bacalhau/pkg/node" "github.com/filecoin-project/bacalhau/pkg/requesternode" testutils "github.com/filecoin-project/bacalhau/pkg/test/utils" @@ -15,7 +17,23 @@ import ( ) func TestScenarios(t *testing.T) { - stack, _ := testutils.SetupTest(context.Background(), t, 1, 0, false, node.NewComputeConfigWithDefaults(), requesternode.NewDefaultRequesterNodeConfig()) + stack, _ := testutils.SetupTest(context.Background(), t, 3, 0, false, node.NewComputeConfigWithDefaults(), requesternode.NewDefaultRequesterNodeConfig()) + + os.Setenv("BACALHAU_ENVIRONMENT", "test") + t.Logf("BACALHAU_ENVIRONMENT: %s", os.Getenv("BACALHAU_ENVIRONMENT")) + + swarmAddresses, err := stack.Nodes[0].IPFSClient.SwarmAddresses(context.Background()) + require.NoError(t, err) + // Need to set the swarm addresses for getIPFSDownloadSettings() to work in test + os.Setenv("BACALHAU_IPFS_SWARM_ADDRESSES", strings.Join(swarmAddresses, ",")) + t.Logf("BACALHAU_IPFS_SWARM_ADDRESSES: %s", os.Getenv("BACALHAU_IPFS_SWARM_ADDRESSES")) + + // Add data to devstack IPFS + testString := "This is a test string" + cid, err := ipfs.AddTextToNodes(context.Background(), []byte(testString), stack.IPFSClients()...) + require.NoError(t, err) + // Need to set the local ipfs CID for SubmitDockerIPFSJobAndGet() to work in test + os.Setenv("BACALHAU_CANARY_TEST_CID", cid) host := stack.Nodes[0].APIServer.Host port := stack.Nodes[0].APIServer.Port diff --git a/pkg/compute/backend/service.go b/pkg/compute/backend/service.go index 7fe346b2bc..69f7ed5980 100644 --- a/pkg/compute/backend/service.go +++ b/pkg/compute/backend/service.go @@ -80,13 +80,13 @@ func (s BaseService) Run(ctx context.Context, execution store.Execution) (err er jobsFailed.With(prometheus.Labels{ "node_id": s.ID, "shard_index": strconv.Itoa(execution.Shard.Index), - "client_id": execution.Shard.Job.ClientID, + "client_id": execution.Shard.Job.Metadata.ClientID, }).Inc() } else { jobsCompleted.With(prometheus.Labels{ "node_id": s.ID, "shard_index": strconv.Itoa(execution.Shard.Index), - "client_id": execution.Shard.Job.ClientID, + "client_id": execution.Shard.Job.Metadata.ClientID, }).Inc() } diff --git a/pkg/compute/bidstrategy/distance_delay_strategy.go b/pkg/compute/bidstrategy/distance_delay_strategy.go index c7a24641e8..f93f90955c 100644 --- a/pkg/compute/bidstrategy/distance_delay_strategy.go +++ b/pkg/compute/bidstrategy/distance_delay_strategy.go @@ -36,7 +36,7 @@ func (s DistanceDelayStrategy) ShouldBid(ctx context.Context, request BidStrateg } if jobNodeDistanceDelayMs > 0 { - log.Ctx(ctx).Debug().Msgf("Waiting %d ms before selecting job %s", jobNodeDistanceDelayMs, request.Job.ID) + log.Ctx(ctx).Debug().Msgf("Waiting %d ms before selecting job %s", jobNodeDistanceDelayMs, request.Job.Metadata.ID) time.Sleep(time.Millisecond * time.Duration(jobNodeDistanceDelayMs)) //nolint:gosec } @@ -61,7 +61,7 @@ func (s DistanceDelayStrategy) calculateJobNodeDistanceDelay(ctx context.Context // This will decrease overall network traffic, improving CPU and memory // usage in large clusters. nodeHash := hash(request.NodeID) - jobHash := hash(request.Job.ID) + jobHash := hash(request.Job.Metadata.ID) // Range: 0 through 4,294,967,295. (4 billion) distance := diff(nodeHash, jobHash) // scale distance per chunk by concurrency (so that many nodes bid on a job @@ -69,7 +69,7 @@ func (s DistanceDelayStrategy) calculateJobNodeDistanceDelay(ctx context.Context // If concurrency=3 and network size=3, there'll only be one piece and // everyone will bid. If concurrency=1 and network size=1 million, there // will be a million slices of the hash space. - concurrency := max(1, request.Job.Deal.Concurrency, request.Job.Deal.MinBids) + concurrency := max(1, request.Job.Spec.Deal.Concurrency, request.Job.Spec.Deal.MinBids) chunk := int((float32(concurrency) / float32(s.networkSize)) * 4294967295) //nolint:gomnd // wait 1 second per chunk distance. So, if we land in exactly the same // chunk, bid immediately. If we're one chunk away, wait a bit before @@ -77,7 +77,7 @@ func (s DistanceDelayStrategy) calculateJobNodeDistanceDelay(ctx context.Context delay := (distance / chunk) * 1000 //nolint:gomnd log.Ctx(ctx).Trace().Msgf( "node/job %s/%s, %d/%d, dist=%d, chunk=%d, delay=%d", - request.NodeID, request.Job.ID, nodeHash, jobHash, distance, chunk, delay, + request.NodeID, request.Job.Metadata.ID, nodeHash, jobHash, distance, chunk, delay, ) shouldRun := true // if delay is too high, just exit immediately. @@ -86,7 +86,7 @@ func (s DistanceDelayStrategy) calculateJobNodeDistanceDelay(ctx context.Context shouldRun = false log.Ctx(ctx).Warn().Msgf( "dropped job: node/job %s/%s, %d/%d, dist=%d, chunk=%d, delay=%d", - request.NodeID, request.Job.ID, nodeHash, jobHash, distance, chunk, delay, + request.NodeID, request.Job.Metadata.ID, nodeHash, jobHash, distance, chunk, delay, ) } return delay, shouldRun diff --git a/pkg/compute/bidstrategy/export_test.go b/pkg/compute/bidstrategy/export_test.go index cfbea0a90a..221273019b 100644 --- a/pkg/compute/bidstrategy/export_test.go +++ b/pkg/compute/bidstrategy/export_test.go @@ -6,7 +6,9 @@ func getBidStrategyRequest() BidStrategyRequest { return BidStrategyRequest{ NodeID: "node-id", Job: model.Job{ - ID: "job-id", + Metadata: model.Metadata{ + ID: "job-id", + }, Spec: model.Spec{ Engine: model.EngineNoop, }, diff --git a/pkg/compute/bidstrategy/external_http_strategy_test.go b/pkg/compute/bidstrategy/external_http_strategy_test.go index e410393e6c..bcc42ff8b9 100644 --- a/pkg/compute/bidstrategy/external_http_strategy_test.go +++ b/pkg/compute/bidstrategy/external_http_strategy_test.go @@ -62,7 +62,7 @@ func TestJobSelectionHttp(t *testing.T) { require.Equal(t, test.expectedResult, result.ShouldBid) // this makes sure that the http payload was given to the http endpoint - require.Equal(t, request.Job.ID, requestPayload.JobID) + require.Equal(t, request.Job.Metadata.ID, requestPayload.JobID) }) } } diff --git a/pkg/compute/bidstrategy/type.go b/pkg/compute/bidstrategy/type.go index 8f1e388039..20651f041e 100644 --- a/pkg/compute/bidstrategy/type.go +++ b/pkg/compute/bidstrategy/type.go @@ -40,8 +40,8 @@ type JobSelectionPolicyProbeData struct { func getJobSelectionPolicyProbeData(request BidStrategyRequest) JobSelectionPolicyProbeData { return JobSelectionPolicyProbeData{ NodeID: request.NodeID, - JobID: request.Job.ID, + JobID: request.Job.Metadata.ID, Spec: request.Job.Spec, - ExecutionPlan: request.Job.ExecutionPlan, + ExecutionPlan: request.Job.Spec.ExecutionPlan, } } diff --git a/pkg/compute/capacity/disk/calculator.go b/pkg/compute/capacity/disk/calculator.go index c1081e86e4..5717dd9c9b 100644 --- a/pkg/compute/capacity/disk/calculator.go +++ b/pkg/compute/capacity/disk/calculator.go @@ -43,7 +43,7 @@ func (c *DiskUsageCalculator) Calculate( // TODO: think about the fact that each shard might be different sizes // this is probably good enough for now - totalShards := job.ExecutionPlan.TotalShards + totalShards := job.Spec.ExecutionPlan.TotalShards if totalShards == 0 { totalShards = 1 } diff --git a/pkg/compute/frontend/service.go b/pkg/compute/frontend/service.go index 1ca5bb2eae..4b691cc269 100644 --- a/pkg/compute/frontend/service.go +++ b/pkg/compute/frontend/service.go @@ -51,8 +51,8 @@ func (s BaseService) GetNodeID() string { func (s BaseService) AskForBid(ctx context.Context, request AskForBidRequest) (AskForBidResponse, error) { ctx, span := s.newSpan(ctx, "AskForBid") defer span.End() - log.Ctx(ctx).Debug().Msgf("job created: %s", request.Job.ID) - jobsReceived.With(prometheus.Labels{"node_id": s.id, "client_id": request.Job.ClientID}).Inc() + log.Ctx(ctx).Debug().Msgf("job created: %s", request.Job.Metadata.ID) + jobsReceived.With(prometheus.Labels{"node_id": s.id, "client_id": request.Job.Metadata.ClientID}).Inc() // ask the bidding strategy if we should bid on this job // TODO: we should check at the shard level, not the job level @@ -164,7 +164,7 @@ func (s BaseService) BidAccepted(ctx context.Context, request BidAcceptedRequest jobsAccepted.With(prometheus.Labels{ "node_id": s.id, "shard_index": strconv.Itoa(execution.Shard.Index), - "client_id": execution.Shard.Job.ClientID, + "client_id": execution.Shard.Job.Metadata.ClientID, }).Inc() err = s.backend.Run(ctx, execution) diff --git a/pkg/compute/pubsub/backend_callback.go b/pkg/compute/pubsub/backend_callback.go index 21ec09d44d..338f82ab14 100644 --- a/pkg/compute/pubsub/backend_callback.go +++ b/pkg/compute/pubsub/backend_callback.go @@ -97,7 +97,7 @@ func (p BackendCallback) constructEvent(ctx context.Context, executionID string, } return model.JobEvent{ SourceNodeID: p.nodeID, - JobID: execution.Shard.Job.ID, + JobID: execution.Shard.Job.Metadata.ID, ShardIndex: execution.Shard.Index, EventName: eventName, EventTime: time.Now(), diff --git a/pkg/compute/pubsub/frontend_proxy.go b/pkg/compute/pubsub/frontend_proxy.go index 3e9fb2a571..b300f6cbb2 100644 --- a/pkg/compute/pubsub/frontend_proxy.go +++ b/pkg/compute/pubsub/frontend_proxy.go @@ -70,7 +70,7 @@ func (p FrontendEventProxy) subscriptionEventCreated(ctx context.Context, event } shardIndexes := []int{} - for i := 0; i < job.ExecutionPlan.TotalShards; i++ { + for i := 0; i < job.Spec.ExecutionPlan.TotalShards; i++ { shardIndexes = append(shardIndexes, i) } request := frontend.AskForBidRequest{ @@ -159,14 +159,14 @@ func (p FrontendEventProxy) processBidJob(ctx context.Context, executionID strin return fmt.Errorf("error getting execution with id %s: %w", executionID, err) } - jobState, err := p.jobStore.GetJobState(ctx, execution.Shard.Job.ID) + jobState, err := p.jobStore.GetJobState(ctx, execution.Shard.Job.Metadata.ID) if err != nil { - return fmt.Errorf("error getting job state for job %s: %w", execution.Shard.Job.ID, err) + return fmt.Errorf("error getting job state for job %s: %w", execution.Shard.Job.Metadata.ID, err) } - j, err := p.jobStore.GetJob(ctx, execution.Shard.Job.ID) + j, err := p.jobStore.GetJob(ctx, execution.Shard.Job.Metadata.ID) if err != nil { - return fmt.Errorf("error getting job with id %s: %w", execution.Shard.Job.ID, err) + return fmt.Errorf("error getting job with id %s: %w", execution.Shard.Job.Metadata.ID, err) } hasShardReachedCapacity := jobutils.HasShardReachedCapacity(ctx, j, jobState, execution.Shard.Index) @@ -186,7 +186,7 @@ func (p FrontendEventProxy) processBidJob(ctx context.Context, executionID strin func (p FrontendEventProxy) constructEvent(ctx context.Context, execution store.Execution, eventName model.JobEventType) model.JobEvent { return model.JobEvent{ SourceNodeID: p.nodeID, - JobID: execution.Shard.Job.ID, + JobID: execution.Shard.Job.Metadata.ID, ShardIndex: execution.Shard.Index, EventName: eventName, EventTime: time.Now(), diff --git a/pkg/compute/store/inmemory/store_test.go b/pkg/compute/store/inmemory/store_test.go index f2f2e42cbb..8e5a99f57c 100644 --- a/pkg/compute/store/inmemory/store_test.go +++ b/pkg/compute/store/inmemory/store_test.go @@ -246,7 +246,11 @@ func newExecution() store.Execution { return *store.NewExecution( uuid.NewString(), model.JobShard{ - Job: &model.Job{ID: uuid.NewString()}, + Job: &model.Job{ + Metadata: model.Metadata{ + ID: uuid.NewString(), + }, + }, Index: 1, }, model.ResourceUsageData{ diff --git a/pkg/compute/store/test/active_executions_test.go b/pkg/compute/store/test/active_executions_test.go index fc93f55061..2e5a2de212 100644 --- a/pkg/compute/store/test/active_executions_test.go +++ b/pkg/compute/store/test/active_executions_test.go @@ -65,7 +65,11 @@ func newExecution() store.Execution { return *store.NewExecution( uuid.NewString(), model.JobShard{ - Job: &model.Job{ID: uuid.NewString()}, + Job: &model.Job{ + Metadata: model.Metadata{ + ID: uuid.NewString(), + }, + }, Index: 1, }, model.ResourceUsageData{ diff --git a/pkg/compute/store/utils_test.go b/pkg/compute/store/utils_test.go index 07b6f5d774..2fc2f6f8a7 100644 --- a/pkg/compute/store/utils_test.go +++ b/pkg/compute/store/utils_test.go @@ -33,7 +33,11 @@ func newExecution() Execution { return *NewExecution( uuid.NewString(), model.JobShard{ - Job: &model.Job{ID: uuid.NewString()}, + Job: &model.Job{ + Metadata: model.Metadata{ + ID: uuid.NewString(), + }, + }, Index: 1, }, model.ResourceUsageData{ diff --git a/pkg/executor/docker/executor.go b/pkg/executor/docker/executor.go index 4fc7ce8e62..f0b95e3c95 100644 --- a/pkg/executor/docker/executor.go +++ b/pkg/executor/docker/executor.go @@ -359,13 +359,13 @@ func (e *Executor) cleanupAll(ctx context.Context) { } func (e *Executor) jobContainerName(shard model.JobShard) string { - return fmt.Sprintf("bacalhau-%s-%s-%d", e.ID, shard.Job.ID, shard.Index) + return fmt.Sprintf("bacalhau-%s-%s-%d", e.ID, shard.Job.Metadata.ID, shard.Index) } func (e *Executor) jobContainerLabels(job *model.Job) map[string]string { return map[string]string{ "bacalhau-executor": e.ID, - "bacalhau-jobID": job.ID, + "bacalhau-jobID": job.Metadata.ID, } } diff --git a/pkg/executor/docker/executor_test.go b/pkg/executor/docker/executor_test.go index 1a0594d05d..cc19d4beb2 100644 --- a/pkg/executor/docker/executor_test.go +++ b/pkg/executor/docker/executor_test.go @@ -119,7 +119,9 @@ func runJobGetStdout( result := t.TempDir() j := &model.Job{ - ID: "test", + Metadata: model.Metadata{ + ID: "test", + }, Spec: spec, } shard := model.JobShard{ diff --git a/pkg/executor/wasm/executor.go b/pkg/executor/wasm/executor.go index 0ab419f079..ac3eb99f5b 100644 --- a/pkg/executor/wasm/executor.go +++ b/pkg/executor/wasm/executor.go @@ -247,35 +247,35 @@ func (e *Executor) RunShard( // Load and instantiate imported modules for _, wasmSpec := range wasmSpec.ImportModules { - log.Ctx(ctx).Info().Msgf("Load imported module '%s' for job '%s'", wasmSpec.Name, shard.Job.ID) + log.Ctx(ctx).Info().Msgf("Load imported module '%s' for job '%s'", wasmSpec.Name, shard.Job.Metadata.ID) importedWasi, importErr := e.loadRemoteModule(ctx, wasmSpec) if importErr != nil { return failResult(importErr) } importedModules = append(importedModules, importedWasi) - log.Ctx(ctx).Info().Msgf("Add imported module '%s' to WASM namespace for job '%s'", importedWasi.Name(), shard.Job.ID) + log.Ctx(ctx).Info().Msgf("Add imported module '%s' to WASM namespace for job '%s'", importedWasi.Name(), shard.Job.Metadata.ID) _, instantiateErr := namespace.InstantiateModule(ctx, importedWasi, config) if instantiateErr != nil { return failResult(instantiateErr) } } - log.Ctx(ctx).Debug().Msgf("Compilation of WASI runtime for job '%s'", shard.Job.ID) + log.Ctx(ctx).Debug().Msgf("Compilation of WASI runtime for job '%s'", shard.Job.Metadata.ID) wasi, err := wasi_snapshot_preview1.NewBuilder(e.Engine).Compile(ctx) if err != nil { return failResult(err) } defer wasi.Close(ctx) - log.Ctx(ctx).Debug().Msgf("Instantiating WASI runtime for job '%s'", shard.Job.ID) + log.Ctx(ctx).Debug().Msgf("Instantiating WASI runtime for job '%s'", shard.Job.Metadata.ID) _, err = namespace.InstantiateModule(ctx, wasi, config) if err != nil { return failResult(err) } // Now instantiate the module and run the entry point. - log.Ctx(ctx).Debug().Msgf("Instantiation of module for job '%s'", shard.Job.ID) + log.Ctx(ctx).Debug().Msgf("Instantiation of module for job '%s'", shard.Job.Metadata.ID) instance, err := namespace.InstantiateModule(ctx, module, config) if err != nil { return failResult(err) @@ -292,7 +292,7 @@ func (e *Executor) RunShard( // the exit code for inclusion in the job output, and ignore the return code // from the function (most WASI compilers will not give one). Some compilers // though do not set an exit code, so we use a default of -1. - log.Ctx(ctx).Debug().Msgf("Running WASM '%s' from job '%s'", entryPoint, shard.Job.ID) + log.Ctx(ctx).Debug().Msgf("Running WASM '%s' from job '%s'", entryPoint, shard.Job.Metadata.ID) entryFunc := instance.ExportedFunction(entryPoint) exitCode := int(-1) _, wasmErr := entryFunc.Call(ctx) diff --git a/pkg/job/factory.go b/pkg/job/factory.go index fb037f42ec..491bd1a2c0 100644 --- a/pkg/job/factory.go +++ b/pkg/job/factory.go @@ -15,17 +15,25 @@ func ConstructJobFromEvent(ev model.JobEvent) *model.Job { publicKey = []byte{} } - return &model.Job{ - APIVersion: ev.APIVersion, - ID: ev.JobID, - RequesterNodeID: ev.SourceNodeID, - RequesterPublicKey: publicKey, - ClientID: ev.ClientID, - Spec: ev.Spec, - Deal: ev.Deal, - ExecutionPlan: ev.JobExecutionPlan, - CreatedAt: time.Now(), + j := &model.Job{ + APIVersion: ev.APIVersion, + Metadata: model.Metadata{ + ID: ev.JobID, + ClientID: ev.ClientID, + CreatedAt: time.Now(), + }, + Status: model.JobStatus{ + Requester: model.JobRequester{ + RequesterNodeID: ev.SourceNodeID, + RequesterPublicKey: publicKey, + }, + }, + Spec: ev.Spec, } + j.Spec.Deal = ev.Deal + j.Spec.ExecutionPlan = ev.JobExecutionPlan + + return j } // these are util methods for the CLI @@ -133,7 +141,7 @@ func ConstructDockerJob( //nolint:funlen j.Spec.Docker.WorkingDirectory = workingDir } - j.Deal = model.Deal{ + j.Spec.Deal = model.Deal{ Concurrency: concurrency, Confidence: confidence, MinBids: minBids, @@ -212,7 +220,7 @@ func ConstructLanguageJob( j.Spec.Annotations = jobAnnotations j.Spec.DoNotTrack = doNotTrack - j.Deal = model.Deal{ + j.Spec.Deal = model.Deal{ Concurrency: concurrency, Confidence: confidence, MinBids: minBids, diff --git a/pkg/job/factory_test.go b/pkg/job/factory_test.go index 7fc2ab4142..576970c037 100644 --- a/pkg/job/factory_test.go +++ b/pkg/job/factory_test.go @@ -3,6 +3,7 @@ package job import ( + "reflect" "strings" "testing" @@ -30,7 +31,7 @@ func (suite *JobFactorySuite) SetupTest() { logger.ConfigureTestLogging(suite.T()) } -func (suite *JobFactorySuite) TestRun_Outputs() { +func (suite *JobFactorySuite) TestRun_DockerJobOutputs() { tests := []struct { numberOfJobs int }{ @@ -110,3 +111,146 @@ func (suite *JobFactorySuite) TestRun_Outputs() { } } } + +func (suite *JobFactorySuite) TestRun_ConstructJobFromEvent() { + tests := []struct { + numberOfJobs int + }{ + {numberOfJobs: 1}, + } + + // Expect a Job create form an event to have all of the following fields + requiredJobFields := []string{ + "APIVersion", + "Metadata", + "Spec", + "Status", + } + + for range tests { + + testEvents := []struct { + jobEvent model.JobEvent + err string + missingFields []string + }{ + { + model.JobEvent{ + APIVersion: model.APIVersionLatest().String(), + JobID: "1111", + ClientID: "2222", + SourceNodeID: "3333", + SenderPublicKey: []byte("sender-pub-key"), + Spec: model.Spec{ + Engine: model.EngineNoop, + Verifier: model.VerifierNoop, + Publisher: model.PublisherNoop, + }, + Deal: model.Deal{ + Concurrency: 1, + }, + JobExecutionPlan: model.JobExecutionPlan{ + TotalShards: 1, + }, + }, + "", + []string{}, + }, + { + model.JobEvent{ + JobID: "job-id1", + ClientID: "test-client-id", + SourceNodeID: "test-src-node-id", + SenderPublicKey: []byte("test-sender-pub-key"), + Spec: model.Spec{ + Engine: model.EngineNoop, + Verifier: model.VerifierNoop, + Publisher: model.PublisherNoop, + }, + Deal: model.Deal{ + Concurrency: 1, + }, + JobExecutionPlan: model.JobExecutionPlan{ + TotalShards: 1, + }, + }, + "Missing APIVersion", + []string{"APIVersion"}, + }, + { + model.JobEvent{ + APIVersion: model.APIVersionLatest().String(), + ClientID: "2222", + SourceNodeID: "3333", + SenderPublicKey: []byte("sender-pub-key"), + Spec: model.Spec{ + Engine: model.EngineNoop, + Verifier: model.VerifierNoop, + Publisher: model.PublisherNoop, + }, + Deal: model.Deal{ + Concurrency: 1, + }, + JobExecutionPlan: model.JobExecutionPlan{ + TotalShards: 1, + }, + }, + "Missing JobID", + []string{"JobID"}, + }, + { + model.JobEvent{ + APIVersion: model.APIVersionLatest().String(), + SourceNodeID: "3333", + SenderPublicKey: []byte("sender-pub-key"), + Spec: model.Spec{ + Engine: model.EngineNoop, + Verifier: model.VerifierNoop, + Publisher: model.PublisherNoop, + }, + Deal: model.Deal{ + Concurrency: 1, + }, + JobExecutionPlan: model.JobExecutionPlan{ + TotalShards: 1, + }, + }, + "Missing JobID", + []string{"JobID"}, + }, + } + + for _, tevent := range testEvents { + func() { + j := ConstructJobFromEvent(tevent.jobEvent) + + if tevent.err != "" { + for _, missingField := range tevent.missingFields { + if missingField == "APIVersion" { + require.Empty(suite.T(), j.APIVersion, "APIVersion should be empty - %+v", j) + } else if missingField == "JobID" { + require.Empty(suite.T(), j.Metadata.ID, "JobID should be empty - %+v", j) + } else if missingField == "ClientID" { + require.Empty(suite.T(), j.Metadata.ClientID, "ClientID should be empty - %+v", j) + } + } + } else { + // Expect required fields to exist + for _, field := range requiredJobFields { + require.False(suite.T(), reflect.DeepEqual(reflect.ValueOf(j).Elem().FieldByName(field), reflect.Value{}), "Field %s not found in job - %+v", field, j) + } + + // check if fields match + require.Equal(suite.T(), j.APIVersion, tevent.jobEvent.APIVersion, "Job does not contain expected APIVersion value - %+v - %+v", tevent.jobEvent, j) + require.Equal(suite.T(), j.Metadata.ID, tevent.jobEvent.JobID, "Job does not contain expected JobID value - %+v - %+v", tevent.jobEvent, j) + require.Equal(suite.T(), j.Metadata.ClientID, tevent.jobEvent.ClientID, "Job does not contain expected ClientID value - %+v - %+v", tevent.jobEvent, j) + require.Equal(suite.T(), j.Spec.Engine, tevent.jobEvent.Spec.Engine, "Job does not contain expected Spec.Engine value - %+v - %+v", tevent.jobEvent, j) + require.Equal(suite.T(), j.Spec.Verifier, tevent.jobEvent.Spec.Verifier, "Job does not contain expected Spec.Verifier value - %+v - %+v", tevent.jobEvent, j) + require.Equal(suite.T(), j.Spec.Publisher, tevent.jobEvent.Spec.Publisher, "Job does not contain expected Spec.Publisher value - %+v - %+v", tevent.jobEvent, j) + require.Equal(suite.T(), j.Spec.Deal.Concurrency, tevent.jobEvent.Deal.Concurrency, "Job does not contain expected Spec.Deal.Concurrency value - %+v - %+v", tevent.jobEvent, j) + require.Equal(suite.T(), j.Spec.ExecutionPlan.TotalShards, tevent.jobEvent.JobExecutionPlan.TotalShards, "Job does not contain expected Spec.ExecutionPlan.TotalShards value - %+v - %+v", tevent.jobEvent, j) + } + }() + } + } +} diff --git a/pkg/job/sharding.go b/pkg/job/sharding.go index c9f0e02daf..d42d34d7b3 100644 --- a/pkg/job/sharding.go +++ b/pkg/job/sharding.go @@ -70,7 +70,7 @@ func ApplyGlobPattern( } func GetJobTotalShards(j *model.Job) int { - shardCount := j.ExecutionPlan.TotalShards + shardCount := j.Spec.ExecutionPlan.TotalShards if shardCount == 0 { shardCount = 1 } @@ -78,7 +78,7 @@ func GetJobTotalShards(j *model.Job) int { } func GetJobConcurrency(j *model.Job) int { - concurrency := j.Deal.Concurrency + concurrency := j.Spec.Deal.Concurrency if concurrency < 1 { concurrency = 1 } diff --git a/pkg/job/state.go b/pkg/job/state.go index 76e75e7a6d..eff944d1d6 100644 --- a/pkg/job/state.go +++ b/pkg/job/state.go @@ -269,15 +269,15 @@ func (resolver *StateResolver) CheckShardStates( defer span.End() system.AddJobIDFromBaggageToSpan(ctx, span) - jobState, err := resolver.stateLoader(ctx, shard.Job.ID) + jobState, err := resolver.stateLoader(ctx, shard.Job.Metadata.ID) if err != nil { return false, err } - concurrency := int(math.Max(float64(shard.Job.Deal.Concurrency), 1)) + concurrency := int(math.Max(float64(shard.Job.Spec.Deal.Concurrency), 1)) shardStates := GetStatesForShardIndex(jobState, shard.Index) if len(shardStates) == 0 { - return false, fmt.Errorf("job (%s) has no shard state for shard index %d", shard.Job.ID, shard.Index) + return false, fmt.Errorf("job (%s) has no shard state for shard index %d", shard.Job.Metadata.ID, shard.Index) } shardCheckResult, err := shardStateChecker(shardStates, concurrency) @@ -368,7 +368,7 @@ func HasShardReachedCapacity(ctx context.Context, j *model.Job, jobState model.J } } - return acceptedBidsSeen >= j.Deal.Concurrency + return acceptedBidsSeen >= j.Spec.Deal.Concurrency } // group states by shard index so we can easily iterate over a whole set of them diff --git a/pkg/job/util.go b/pkg/job/util.go index 43c14e3dbb..bebef882e7 100644 --- a/pkg/job/util.go +++ b/pkg/job/util.go @@ -124,7 +124,7 @@ func ShortID(id string) string { func ComputeStateSummary(j *model.Job) string { var currentJobState model.JobStateType - jobShardStates := FlattenShardStates(j.State) + jobShardStates := FlattenShardStates(j.Status.State) for i := range jobShardStates { if jobShardStates[i].State > currentJobState { currentJobState = jobShardStates[i].State @@ -139,7 +139,7 @@ func ComputeResultsSummary(j *model.Job) string { if GetJobTotalShards(j) > 1 { resultSummary = "" } else { - completedShards := GetCompletedShardStates(j.State) + completedShards := GetCompletedShardStates(j.Status.State) if len(completedShards) == 0 { resultSummary = "" } else { @@ -155,7 +155,7 @@ func ComputeVerifiedSummary(j *model.Job) string { verifiedSummary = "" } else { totalShards := GetJobTotalExecutionCount(j) - verifiedShardCount := CountVerifiedShardStates(j.State) + verifiedShardCount := CountVerifiedShardStates(j.Status.State) verifiedSummary = fmt.Sprintf("%d/%d", verifiedShardCount, totalShards) } return verifiedSummary @@ -163,7 +163,7 @@ func ComputeVerifiedSummary(j *model.Job) string { func GetPublishedStorageSpec(shard model.JobShard, storageType model.StorageSourceType, hostID, cid string) model.StorageSpec { return model.StorageSpec{ - Name: fmt.Sprintf("job-%s-shard-%d-host-%s", shard.Job.ID, shard.Index, hostID), + Name: fmt.Sprintf("job-%s-shard-%d-host-%s", shard.Job.Metadata.ID, shard.Index, hostID), StorageSource: storageType, CID: cid, Metadata: map[string]string{}, diff --git a/pkg/job/validate.go b/pkg/job/validate.go index dca3887ded..72ce9719e9 100644 --- a/pkg/job/validate.go +++ b/pkg/job/validate.go @@ -8,20 +8,35 @@ import ( "github.com/filecoin-project/bacalhau/pkg/model" ) +func VerifyJobCreatePayload(ctx context.Context, jc *model.JobCreatePayload) error { + if jc.ClientID == "" { + return fmt.Errorf("ClientID is empty") + } + + if jc.APIVersion == "" { + return fmt.Errorf("APIVersion is empty") + } + + return VerifyJob(ctx, &model.Job{ + APIVersion: jc.APIVersion, + Spec: *jc.Spec, + }) +} + func VerifyJob(ctx context.Context, j *model.Job) error { if reflect.DeepEqual(model.Spec{}, j.Spec) { return fmt.Errorf("job spec is empty") } - if reflect.DeepEqual(model.Deal{}, j.Deal) { + if reflect.DeepEqual(model.Deal{}, j.Spec.Deal) { return fmt.Errorf("job deal is empty") } - if j.Deal.Concurrency <= 0 { + if j.Spec.Deal.Concurrency <= 0 { return fmt.Errorf("concurrency must be >= 1") } - if j.Deal.Confidence < 0 { + if j.Spec.Deal.Confidence < 0 { return fmt.Errorf("confidence must be >= 0") } @@ -37,7 +52,7 @@ func VerifyJob(ctx context.Context, j *model.Job) error { return fmt.Errorf("invalid publisher type: %s", j.Spec.Publisher.String()) } - if j.Deal.Confidence > j.Deal.Concurrency { + if j.Spec.Deal.Confidence > j.Spec.Deal.Concurrency { return fmt.Errorf("the deal confidence cannot be higher than the concurrency") } diff --git a/pkg/localdb/inmemory/inmemory.go b/pkg/localdb/inmemory/inmemory.go index e09a50973d..d1d6db29ad 100644 --- a/pkg/localdb/inmemory/inmemory.go +++ b/pkg/localdb/inmemory/inmemory.go @@ -119,7 +119,7 @@ func (d *InMemoryDatastore) GetJobs(ctx context.Context, query localdb.JobQuery) } else if query.ClientID != "" { log.Ctx(ctx).Debug().Msgf("querying for jobs with filter ClientID %s", query.ClientID) for _, j := range d.jobs { - if j.ClientID == query.ClientID { + if j.Metadata.ClientID == query.ClientID { result = append(result, j) } } @@ -130,15 +130,15 @@ func (d *InMemoryDatastore) GetJobs(ctx context.Context, query localdb.JobQuery) case "id": if query.SortReverse { // what does it mean to sort by ID? - return result[i].ID > result[j].ID + return result[i].Metadata.ID > result[j].Metadata.ID } else { - return result[i].ID < result[j].ID + return result[i].Metadata.ID < result[j].Metadata.ID } case "created_at": if query.SortReverse { - return result[i].CreatedAt.UTC().Unix() > result[j].CreatedAt.UTC().Unix() + return result[i].Metadata.CreatedAt.UTC().Unix() > result[j].Metadata.CreatedAt.UTC().Unix() } else { - return result[i].CreatedAt.UTC().Unix() < result[j].CreatedAt.UTC().Unix() + return result[i].Metadata.CreatedAt.UTC().Unix() < result[j].Metadata.CreatedAt.UTC().Unix() } default: return false @@ -176,14 +176,14 @@ func (d *InMemoryDatastore) AddJob(ctx context.Context, j *model.Job) error { d.mtx.Lock() defer d.mtx.Unlock() - existingJob, ok := d.jobs[j.ID] + existingJob, ok := d.jobs[j.Metadata.ID] if ok { - if len(j.RequesterPublicKey) > 0 { - existingJob.RequesterPublicKey = j.RequesterPublicKey + if len(j.Status.Requester.RequesterPublicKey) > 0 { + existingJob.Status.Requester.RequesterPublicKey = j.Status.Requester.RequesterPublicKey } return nil } - d.jobs[j.ID] = j + d.jobs[j.Metadata.ID] = j return nil } @@ -238,7 +238,7 @@ func (d *InMemoryDatastore) UpdateJobDeal(ctx context.Context, jobID string, dea if !ok { return bacerrors.NewJobNotFound(jobID) } - job.Deal = deal + job.Spec.Deal = deal return nil } diff --git a/pkg/localdb/inmemory/inmemory_test.go b/pkg/localdb/inmemory/inmemory_test.go index 404974b155..6104d849b3 100644 --- a/pkg/localdb/inmemory/inmemory_test.go +++ b/pkg/localdb/inmemory/inmemory_test.go @@ -21,7 +21,9 @@ func TestInMemoryDataStore(t *testing.T) { require.NoError(t, err) err = store.AddJob(context.Background(), &model.Job{ - ID: jobId, + Metadata: model.Metadata{ + ID: jobId, + }, }) require.NoError(t, err) @@ -53,7 +55,7 @@ func TestInMemoryDataStore(t *testing.T) { job, err := store.GetJob(context.Background(), jobId) require.NoError(t, err) - require.Equal(t, jobId, job.ID) + require.Equal(t, jobId, job.Metadata.ID) // events, err := store.GetJobEvents(context.Background(), jobId) // require.NoError(t, err) diff --git a/pkg/model/job.go b/pkg/model/job.go index 2385822fcc..7064158272 100644 --- a/pkg/model/job.go +++ b/pkg/model/job.go @@ -11,31 +11,34 @@ import ( type Job struct { APIVersion string `json:"APIVersion" example:"V1beta1"` - // The unique global ID of this job in the bacalhau network. - ID string `json:"ID,omitempty" example:"92d5d4ee-3765-4f78-8353-623f5f26df08"` - - // The ID of the requester node that owns this job. - RequesterNodeID string `json:"RequesterNodeID,omitempty" example:"QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF"` - - // The public key of the Requester node that created this job - // This can be used to encrypt messages back to the creator - RequesterPublicKey PublicKey `json:"RequesterPublicKey,omitempty"` - - // The ID of the client that created this job. - ClientID string `json:"ClientID,omitempty" example:"ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51"` + Metadata Metadata `json:"Metadata,omitempty"` // The specification of this job. Spec Spec `json:"Spec,omitempty"` - // The deal the client has made, such as which job bids they have accepted. - Deal Deal `json:"Deal,omitempty"` + // The status of the job: where are the nodes at, what are the events + Status JobStatus `json:"Status,omitempty"` +} - // how will this job be executed by nodes on the network - ExecutionPlan JobExecutionPlan `json:"ExecutionPlan,omitempty"` +type Metadata struct { + // The unique global ID of this job in the bacalhau network. + ID string `json:"ID,omitempty" example:"92d5d4ee-3765-4f78-8353-623f5f26df08"` // Time the job was submitted to the bacalhau network. CreatedAt time.Time `json:"CreatedAt,omitempty" example:"2022-11-17T13:29:01.871140291Z"` + // The ID of the client that created this job. + ClientID string `json:"ClientID,omitempty" example:"ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51"` +} +type JobRequester struct { + // The ID of the requester node that owns this job. + RequesterNodeID string `json:"RequesterNodeID,omitempty" example:"QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF"` + + // The public key of the Requester node that created this job + // This can be used to encrypt messages back to the creator + RequesterPublicKey PublicKey `json:"RequesterPublicKey,omitempty"` +} +type JobStatus struct { // The current state of the job State JobState `json:"JobState,omitempty"` @@ -44,10 +47,8 @@ type Job struct { // All local events associated with the job LocalEvents []JobLocalEvent `json:"LocalJobEvents,omitempty"` -} -func (job Job) String() string { - return job.ID + Requester JobRequester `json:"Requester,omitempty"` } // TODO: There's probably a better way we want to globally version APIs @@ -65,11 +66,11 @@ func NewJobWithSaneProductionDefaults() (*Job, error) { Engine: EngineDocker, Verifier: VerifierNoop, Publisher: PublisherEstuary, - }, - Deal: Deal{ - Concurrency: 1, - Confidence: 0, - MinBids: 0, // 0 means no minimum before bidding + Deal: Deal{ + Concurrency: 1, + Confidence: 0, + MinBids: 0, // 0 means no minimum before bidding + }, }, }) if err != nil { @@ -95,7 +96,7 @@ type JobShard struct { } func (shard JobShard) ID() string { - return GetShardID(shard.Job.ID, shard.Index) + return GetShardID(shard.Job.Metadata.ID, shard.Index) } func (shard JobShard) String() string { @@ -232,6 +233,12 @@ type Spec struct { // Do not track specified by the client DoNotTrack bool `json:"DoNotTrack,omitempty"` + + // how will this job be executed by nodes on the network + ExecutionPlan JobExecutionPlan `json:"ExecutionPlan,omitempty"` + + // The deal the client has made, such as which job bids they have accepted. + Deal Deal `json:"Deal,omitempty"` } // Return timeout duration @@ -348,8 +355,10 @@ type JobCreatePayload struct { // the id of the client that is submitting the job ClientID string `json:"ClientID,omitempty" validate:"required"` - // The job specification: - Job *Job `json:"Job,omitempty" validate:"required"` + APIVersion string `json:"APIVersion,omitempty" example:"V1beta1" validate:"required"` + + // The specification of this job. + Spec *Spec `json:"Spec,omitempty" validate:"required"` // Optional base64-encoded tar file that will be pinned to IPFS and // mounted as storage for the job. Not part of the spec so we don't diff --git a/pkg/publicapi/client.go b/pkg/publicapi/client.go index 1a85826020..5a015e8f66 100644 --- a/pkg/publicapi/client.go +++ b/pkg/publicapi/client.go @@ -227,8 +227,9 @@ func (apiClient *APIClient) Submit( defer span.End() data := model.JobCreatePayload{ - ClientID: system.GetClientID(), - Job: j, + ClientID: system.GetClientID(), + APIVersion: j.APIVersion, + Spec: &j.Spec, } if buildContext != nil { @@ -247,9 +248,9 @@ func (apiClient *APIClient) Submit( var res submitResponse req := submitRequest{ - Data: data, - ClientSignature: signature, - ClientPublicKey: system.GetClientPublicKey(), + JobCreatePayload: data, + ClientSignature: signature, + ClientPublicKey: system.GetClientPublicKey(), } err = apiClient.post(ctx, "submit", req, &res) diff --git a/pkg/publicapi/client_test.go b/pkg/publicapi/client_test.go index a4e481d66d..74e3f84ca2 100644 --- a/pkg/publicapi/client_test.go +++ b/pkg/publicapi/client_test.go @@ -32,8 +32,8 @@ func TestGet(t *testing.T) { } // Should be able to look up one of them: - job2, ok, err := c.Get(ctx, j.ID) + job2, ok, err := c.Get(ctx, j.Metadata.ID) require.NoError(t, err) require.True(t, ok) - require.Equal(t, job2.ID, j.ID) + require.Equal(t, job2.Metadata.ID, j.Metadata.ID) } diff --git a/pkg/publicapi/endpoints_list.go b/pkg/publicapi/endpoints_list.go index 1bd7621758..693b3bd5fb 100644 --- a/pkg/publicapi/endpoints_list.go +++ b/pkg/publicapi/endpoints_list.go @@ -103,7 +103,7 @@ func (apiServer *APIServer) getJobStates(ctx context.Context, jobList []*model.J var err error for k := range jobList { - jobList[k].State, err = apiServer.localdb.GetJobState(ctx, jobList[k].ID) + jobList[k].Status.State, err = apiServer.localdb.GetJobState(ctx, jobList[k].Metadata.ID) if err != nil { log.Ctx(ctx).Error().Msgf("error getting job state: %s", err) return err diff --git a/pkg/publicapi/endpoints_submit.go b/pkg/publicapi/endpoints_submit.go index 3e0c19d831..cc09004006 100644 --- a/pkg/publicapi/endpoints_submit.go +++ b/pkg/publicapi/endpoints_submit.go @@ -20,7 +20,7 @@ import ( type submitRequest struct { // The data needed to submit and run a job on the network: - Data model.JobCreatePayload `json:"data" validate:"required"` + JobCreatePayload model.JobCreatePayload `json:"job_create_payload" validate:"required"` // A base64-encoded signature of the data, signed by the client: ClientSignature string `json:"signature" validate:"required"` @@ -55,7 +55,7 @@ func (apiServer *APIServer) submit(res http.ResponseWriter, req *http.Request) { http.Error(res, bacerrors.ErrorToErrorResponse(err), http.StatusBadRequest) return } - res.Header().Set(handlerwrapper.HTTPHeaderClientID, submitReq.Data.ClientID) + res.Header().Set(handlerwrapper.HTTPHeaderClientID, submitReq.JobCreatePayload.ClientID) if err := verifySubmitRequest(&submitReq); err != nil { log.Ctx(ctx).Debug().Msgf("====> VerifySubmitRequest error: %s", err) @@ -64,17 +64,17 @@ func (apiServer *APIServer) submit(res http.ResponseWriter, req *http.Request) { return } - if err := job.VerifyJob(ctx, submitReq.Data.Job); err != nil { - log.Ctx(ctx).Debug().Msgf("====> VerifyJob error: %s", err) + if err := job.VerifyJobCreatePayload(ctx, &submitReq.JobCreatePayload); err != nil { + log.Ctx(ctx).Debug().Msgf("====> VerifyJobCreate error: %s", err) errorResponse := bacerrors.ErrorToErrorResponse(err) http.Error(res, errorResponse, http.StatusBadRequest) return } // If we have a build context, pin it to IPFS and mount it in the job: - if submitReq.Data.Context != "" { + if submitReq.JobCreatePayload.Context != "" { // TODO: gc pinned contexts - decoded, err := base64.StdEncoding.DecodeString(submitReq.Data.Context) + decoded, err := base64.StdEncoding.DecodeString(submitReq.JobCreatePayload.Context) if err != nil { log.Ctx(ctx).Debug().Msgf("====> DecodeContext error: %s", err) errorResponse := bacerrors.ErrorToErrorResponse(err) @@ -118,7 +118,7 @@ func (apiServer *APIServer) submit(res http.ResponseWriter, req *http.Request) { // NOTE(luke): we could do some kind of storage multiaddr here, e.g.: // --cid ipfs:abc --cid filecoin:efg - submitReq.Data.Job.Spec.Contexts = append(submitReq.Data.Job.Spec.Contexts, model.StorageSpec{ + submitReq.JobCreatePayload.Spec.Contexts = append(submitReq.JobCreatePayload.Spec.Contexts, model.StorageSpec{ StorageSource: model.StorageSourceIPFS, CID: result.CID, Path: "/job", @@ -127,10 +127,10 @@ func (apiServer *APIServer) submit(res http.ResponseWriter, req *http.Request) { j, err := apiServer.Requester.SubmitJob( ctx, - submitReq.Data, + submitReq.JobCreatePayload, ) - res.Header().Set(handlerwrapper.HTTPHeaderJobID, j.ID) - span.SetAttributes(attribute.String(model.TracerAttributeNameJobID, j.ID)) + res.Header().Set(handlerwrapper.HTTPHeaderJobID, j.Metadata.ID) + span.SetAttributes(attribute.String(model.TracerAttributeNameJobID, j.Metadata.ID)) if err != nil { http.Error(res, err.Error(), http.StatusInternalServerError) diff --git a/pkg/publicapi/server.go b/pkg/publicapi/server.go index 1b24b1058c..9e59faf2c3 100644 --- a/pkg/publicapi/server.go +++ b/pkg/publicapi/server.go @@ -209,8 +209,8 @@ func (apiServer *APIServer) ListenAndServe(ctx context.Context, cm *system.Clean } func verifySubmitRequest(req *submitRequest) error { - if req.Data.ClientID == "" { - return errors.New("job deal must contain a client ID") + if req.JobCreatePayload.ClientID == "" { + return errors.New("job create payload must contain a client ID") } if req.ClientSignature == "" { return errors.New("client's signature is required") @@ -220,7 +220,7 @@ func verifySubmitRequest(req *submitRequest) error { } // Check that the client's public key matches the client ID: - ok, err := system.PublicKeyMatchesID(req.ClientPublicKey, req.Data.ClientID) + ok, err := system.PublicKeyMatchesID(req.ClientPublicKey, req.JobCreatePayload.ClientID) if err != nil { return fmt.Errorf("error verifying client ID: %w", err) } @@ -229,7 +229,7 @@ func verifySubmitRequest(req *submitRequest) error { } // Check that the signature is valid: - jsonData, err := model.JSONMarshalWithMax(req.Data) + jsonData, err := model.JSONMarshalWithMax(req.JobCreatePayload) if err != nil { return fmt.Errorf("error marshaling job data: %w", err) } diff --git a/pkg/publicapi/util.go b/pkg/publicapi/util.go index 1ecb69f2ca..1072d4b4d4 100644 --- a/pkg/publicapi/util.go +++ b/pkg/publicapi/util.go @@ -232,7 +232,7 @@ func MakeJob( // Outputs: testCase.Outputs, } - j.Deal = model.Deal{ + j.Spec.Deal = model.Deal{ Concurrency: 1, } diff --git a/pkg/publicapi/websocket_test.go b/pkg/publicapi/websocket_test.go index afc5983eb2..1c19039270 100644 --- a/pkg/publicapi/websocket_test.go +++ b/pkg/publicapi/websocket_test.go @@ -71,7 +71,7 @@ func (s *WebsocketSuite) TestWebsocketSingleJob() { j, err := c.Submit(ctx, genericJob, nil) require.NoError(s.T(), err) - url := "ws" + c.BaseURI[4:] + fmt.Sprintf("/websocket?job_id=%s", j.ID) + url := "ws" + c.BaseURI[4:] + fmt.Sprintf("/websocket?job_id=%s", j.Metadata.ID) conn, _, err := websocket.DefaultDialer.Dial(url, nil) require.NoError(s.T(), err) diff --git a/pkg/requesternode/requesternode.go b/pkg/requesternode/requesternode.go index 09d2f5355a..544b19cc4a 100644 --- a/pkg/requesternode/requesternode.go +++ b/pkg/requesternode/requesternode.go @@ -64,7 +64,7 @@ func (node *RequesterNode) HandleJobEvent(ctx context.Context, event model.JobEv } // we only care about jobs that we own - if j.RequesterNodeID != node.ID { + if j.Status.Requester.RequesterNodeID != node.ID { return nil } @@ -96,15 +96,15 @@ func (node *RequesterNode) SubmitJob(ctx context.Context, data model.JobCreatePa ev := node.constructJobEvent(jobID, model.JobEventCreated) - executionPlan, err := jobutils.GenerateExecutionPlan(ctx, data.Job.Spec, node.storageProviders) + executionPlan, err := jobutils.GenerateExecutionPlan(ctx, *data.Spec, node.storageProviders) if err != nil { return &model.Job{}, fmt.Errorf("error generating execution plan: %s", err) } - ev.APIVersion = data.Job.APIVersion + ev.APIVersion = data.APIVersion ev.ClientID = data.ClientID - ev.Spec = data.Job.Spec - ev.Deal = data.Job.Deal + ev.Spec = *data.Spec + ev.Deal = data.Spec.Deal ev.JobExecutionPlan = executionPlan // set a default timeout value if one is not passed or below an acceptable value @@ -221,7 +221,7 @@ func (node *RequesterNode) verifyShard( return verifiedResults, firstError } - err = node.notifyVerificationComplete(ctx, shard.Job.ID) + err = node.notifyVerificationComplete(ctx, shard.Job.Metadata.ID) if err != nil { return nil, err } @@ -242,7 +242,7 @@ func (node *RequesterNode) notifyBidDecision(ctx context.Context, shard model.Jo // publish a local event localEvent := model.JobLocalEvent{ EventName: localEventName, - JobID: shard.Job.ID, + JobID: shard.Job.Metadata.ID, ShardIndex: shard.Index, TargetNodeID: targetNodeID, } @@ -318,7 +318,7 @@ func (node *RequesterNode) constructJobEvent(jobID string, eventName model.JobEv } func (node *RequesterNode) constructShardEvent(shard model.JobShard, eventName model.JobEventType) model.JobEvent { - event := node.constructJobEvent(shard.Job.ID, eventName) + event := node.constructJobEvent(shard.Job.Metadata.ID, eventName) event.ShardIndex = shard.Index return event } diff --git a/pkg/requesternode/shard_fsm.go b/pkg/requesternode/shard_fsm.go index 92fe1b7e9c..c79314e73e 100644 --- a/pkg/requesternode/shard_fsm.go +++ b/pkg/requesternode/shard_fsm.go @@ -167,7 +167,7 @@ func (m *shardStateMachineManager) startShardsState( defer m.mu.Unlock() // explode the job into shard states - for i := 0; i < job.ExecutionPlan.TotalShards; i++ { + for i := 0; i < job.Spec.ExecutionPlan.TotalShards; i++ { shard := model.JobShard{Job: job, Index: i} if _, ok := m.shardStates[shard.ID()]; !ok { shardState := m.newShardStateMachine(ctx, shard, n) @@ -307,7 +307,7 @@ func enqueuedState(ctx context.Context, m *shardStateMachine) stateFn { m.biddingNodes[req.sourceNodeID] = struct{}{} // we have received enough bids to start the selection process. - if len(m.biddingNodes) >= m.shard.Job.Deal.MinBids { + if len(m.biddingNodes) >= m.shard.Job.Spec.Deal.MinBids { return selectingBidsState } } else { @@ -344,7 +344,7 @@ func selectingBidsState(ctx context.Context, m *shardStateMachine) stateFn { acceptedBids := make(map[string]struct{}) for _, candidate := range candidateBids { - if len(acceptedBids) < m.shard.Job.Deal.Concurrency { + if len(acceptedBids) < m.shard.Job.Spec.Deal.Concurrency { err := m.node.notifyBidDecision(ctx, m.shard, candidate, true) if err != nil { log.Ctx(ctx).Error().Err(err).Msgf("%s failed to notify bid acceptance to %s", m, candidate) @@ -363,7 +363,7 @@ func selectingBidsState(ctx context.Context, m *shardStateMachine) stateFn { // updated biddingNodes to hold the accepted bids only. m.biddingNodes = acceptedBids - if len(m.biddingNodes) < m.shard.Job.Deal.Concurrency { + if len(m.biddingNodes) < m.shard.Job.Spec.Deal.Concurrency { // we still need more bids to reach the concurrency level. return acceptingBidsState } else { @@ -387,7 +387,7 @@ func acceptingBidsState(ctx context.Context, m *shardStateMachine) stateFn { // add the bid to the list of accepted bids. m.biddingNodes[req.sourceNodeID] = struct{}{} - if len(m.biddingNodes) >= m.shard.Job.Deal.Concurrency { + if len(m.biddingNodes) >= m.shard.Job.Spec.Deal.Concurrency { return waitingForResultsState } } @@ -450,7 +450,7 @@ func waitingForResultsState(ctx context.Context, m *shardStateMachine) stateFn { // TODO: technically we can start verifying if we have enough results compared to deal's confidence // and concurrency. Though we will have ot handle the case where verification fails, but can still // succeed if we wait for more results. - if len(m.completedNodes) >= m.shard.Job.Deal.Concurrency { + if len(m.completedNodes) >= m.shard.Job.Spec.Deal.Concurrency { return verifyingResultsState } } else { @@ -508,7 +508,7 @@ func errorState(ctx context.Context, m *shardStateMachine) stateFn { ctx, span := system.GetTracer().Start(ctx, "pkg/requesterNode/ShardFSM.errorState") defer span.End() - ctx = system.AddJobIDToBaggage(ctx, m.shard.Job.ID) + ctx = system.AddJobIDToBaggage(ctx, m.shard.Job.Metadata.ID) system.AddJobIDFromBaggageToSpan(ctx, span) err := m.node.notifyShardError( diff --git a/pkg/test/compute/ask_for_bid_test.go b/pkg/test/compute/ask_for_bid_test.go index 6579386bb2..269d32914b 100644 --- a/pkg/test/compute/ask_for_bid_test.go +++ b/pkg/test/compute/ask_for_bid_test.go @@ -95,7 +95,7 @@ func (s *ComputeSuite) runAskForBidTest(testCase bidResponseTestCase) frontend.A // setup default values job := testCase.job - if job.ID == "" { + if job.Metadata.ID == "" { job = generateJob() } shardCount := testCase.shardCount diff --git a/pkg/test/compute/resourcelimits_test.go b/pkg/test/compute/resourcelimits_test.go index cd2f2289f6..f2a8bae189 100644 --- a/pkg/test/compute/resourcelimits_test.go +++ b/pkg/test/compute/resourcelimits_test.go @@ -109,7 +109,7 @@ func (suite *ComputeNodeResourceLimitsSuite) TestTotalResourceLimits() { maxJobCount = currentJobCount } seenJob := SeenJobRecord{ - Id: shard.Job.ID, + Id: shard.Job.Metadata.ID, Start: time.Now().Unix() - epochSeconds, CurrentJobs: currentJobCount, MaxJobs: maxJobCount, @@ -154,8 +154,9 @@ func (suite *ComputeNodeResourceLimitsSuite) TestTotalResourceLimits() { } _, err := stack.Nodes[0].RequesterNode.SubmitJob(ctx, model.JobCreatePayload{ - ClientID: "123", - Job: j, + ClientID: "123", + APIVersion: j.APIVersion, + Spec: &j.Spec, }) require.NoError(suite.T(), err) @@ -331,9 +332,9 @@ func (suite *ComputeNodeResourceLimitsSuite) TestParallelGPU() { Resources: model.ResourceUsageConfig{ GPU: "1", }, - }, - Deal: model.Deal{ - Concurrency: 1, + Deal: model.Deal{ + Concurrency: 1, + }, }, } @@ -348,11 +349,12 @@ func (suite *ComputeNodeResourceLimitsSuite) TestParallelGPU() { for i := 0; i < nodeCount; i++ { submittedJob, err := nodes[0].RequesterNode.SubmitJob(ctx, model.JobCreatePayload{ - ClientID: "123", - Job: jobConfig, + ClientID: "123", + APIVersion: jobConfig.APIVersion, + Spec: &jobConfig.Spec, }) require.NoError(suite.T(), err) - jobIds = append(jobIds, submittedJob.ID) + jobIds = append(jobIds, submittedJob.Metadata.ID) // this needs to be less than the time the job lasts // so we are running jobs in parallel time.Sleep(time.Millisecond * 500) diff --git a/pkg/test/compute/utils_test.go b/pkg/test/compute/utils_test.go index fac4f5baca..10e8d90760 100644 --- a/pkg/test/compute/utils_test.go +++ b/pkg/test/compute/utils_test.go @@ -10,7 +10,9 @@ import ( func generateJob() model.Job { return model.Job{ - ID: uuid.New().String(), + Metadata: model.Metadata{ + ID: uuid.New().String(), + }, APIVersion: model.APIVersionLatest().String(), Spec: model.Spec{ Engine: model.EngineNoop, diff --git a/pkg/test/devstack/lotus_test.go b/pkg/test/devstack/lotus_test.go index de85515033..f740537dc2 100644 --- a/pkg/test/devstack/lotus_test.go +++ b/pkg/test/devstack/lotus_test.go @@ -59,12 +59,13 @@ func (s *lotusNodeSuite) TestLotusNode() { require.NoError(s.T(), err) j := &model.Job{} + j.APIVersion = model.APIVersionLatest().String() j.Spec = testCase.Spec j.Spec.Verifier = model.VerifierNoop j.Spec.Publisher = model.PublisherFilecoin j.Spec.Contexts = contextStorageList j.Spec.Outputs = testCase.Outputs - j.Deal = model.Deal{ + j.Spec.Deal = model.Deal{ Concurrency: 1, } @@ -78,7 +79,7 @@ func (s *lotusNodeSuite) TestLotusNode() { err = resolver.Wait( ctx, - submittedJob.ID, + submittedJob.Metadata.ID, len(nodeIDs), job.WaitThrowErrors([]model.JobStateType{ model.JobStateError, @@ -89,7 +90,7 @@ func (s *lotusNodeSuite) TestLotusNode() { ) require.NoError(s.T(), err) - shards, err := resolver.GetShards(ctx, submittedJob.ID) + shards, err := resolver.GetShards(ctx, submittedJob.Metadata.ID) require.NoError(s.T(), err) require.NotNil(s.T(), stack.Lotus) diff --git a/pkg/test/devstack/sharding_test.go b/pkg/test/devstack/sharding_test.go index d8daac9ff3..82a59831f3 100644 --- a/pkg/test/devstack/sharding_test.go +++ b/pkg/test/devstack/sharding_test.go @@ -223,7 +223,9 @@ func (suite *ShardingSuite) TestNoShards() { directoryCid, err := ipfs.AddFileToNodes(ctx, dirPath, devstack.ToIPFSClients(stack.Nodes[:nodeCount])...) require.NoError(suite.T(), err) - j := &model.Job{} + j := &model.Job{ + APIVersion: model.APIVersionLatest().String(), + } j.Spec = model.Spec{ Engine: model.EngineWasm, Verifier: model.VerifierNoop, @@ -243,7 +245,7 @@ func (suite *ShardingSuite) TestNoShards() { }, } - j.Deal = model.Deal{ + j.Spec.Deal = model.Deal{ Concurrency: nodeCount, } diff --git a/pkg/test/devstack/submit_test.go b/pkg/test/devstack/submit_test.go index 425e76aa23..903ad8c708 100644 --- a/pkg/test/devstack/submit_test.go +++ b/pkg/test/devstack/submit_test.go @@ -59,7 +59,7 @@ func (suite *DevstackSubmitSuite) TestEmptySpec() { apiClient := publicapi.NewAPIClient(apiUri) j := &model.Job{} - j.Deal = model.Deal{Concurrency: 1} + j.Spec.Deal = model.Deal{Concurrency: 1} _, missingSpecError := apiClient.Submit(ctx, j, nil) require.Error(suite.T(), missingSpecError) diff --git a/pkg/test/executor/test_runner.go b/pkg/test/executor/test_runner.go index c9e8dbdf7d..16fecfe68d 100644 --- a/pkg/test/executor/test_runner.go +++ b/pkg/test/executor/test_runner.go @@ -56,16 +56,20 @@ func RunTestCase( spec.Inputs = prepareStorage(testCase.Inputs) spec.Contexts = prepareStorage(testCase.Contexts) spec.Outputs = testCase.Outputs + spec.Deal = model.Deal{Concurrency: testNodeCount} job := &model.Job{ - ID: "test-job", - RequesterNodeID: "test-owner", - ClientID: "test-client", - Spec: spec, - Deal: model.Deal{ - Concurrency: testNodeCount, + Metadata: model.Metadata{ + ID: "test-job", + ClientID: "test-client", + CreatedAt: time.Now(), }, - CreatedAt: time.Now(), + Status: model.JobStatus{ + Requester: model.JobRequester{ + RequesterNodeID: "test-owner", + }, + }, + Spec: spec, } shard := model.JobShard{ diff --git a/pkg/test/scenario/suite.go b/pkg/test/scenario/suite.go index 337060bd6d..a61a902ca6 100644 --- a/pkg/test/scenario/suite.go +++ b/pkg/test/scenario/suite.go @@ -146,9 +146,9 @@ func (s *ScenarioRunner) RunScenario(scenario Scenario) (resultsDir string) { j.Spec.Publisher = model.PublisherIpfs } - j.Deal = scenario.Deal - if j.Deal.Concurrency < 1 { - j.Deal.Concurrency = 1 + j.Spec.Deal = scenario.Deal + if j.Spec.Deal.Concurrency < 1 { + j.Spec.Deal.Concurrency = 1 } apiClient := publicapi.NewAPIClient(stack.Nodes[0].APIServer.GetURI()) @@ -159,11 +159,11 @@ func (s *ScenarioRunner) RunScenario(scenario Scenario) (resultsDir string) { resolver := apiClient.GetJobStateResolver() checkers := scenario.JobCheckers shards := job.GetJobTotalExecutionCount(submittedJob) - err = resolver.Wait(s.Ctx, submittedJob.ID, shards, checkers...) + err = resolver.Wait(s.Ctx, submittedJob.Metadata.ID, shards, checkers...) require.NoError(s.T(), err) // Check outputs - results, err := apiClient.GetResults(s.Ctx, submittedJob.ID) + results, err := apiClient.GetResults(s.Ctx, submittedJob.Metadata.ID) require.NoError(s.T(), err) resultsDir = s.T().TempDir() diff --git a/pkg/test/transport/transport_test.go b/pkg/test/transport/transport_test.go index d1f88dce68..9046549310 100644 --- a/pkg/test/transport/transport_test.go +++ b/pkg/test/transport/transport_test.go @@ -74,6 +74,7 @@ func (suite *TransportSuite) TestTransportEvents() { // Create a new job j := &model.Job{} + j.APIVersion = model.APIVersionLatest().String() j.Spec = model.Spec{ Engine: model.EngineNoop, Verifier: model.VerifierNoop, @@ -85,13 +86,14 @@ func (suite *TransportSuite) TestTransportEvents() { }, } - j.Deal = model.Deal{ + j.Spec.Deal = model.Deal{ Concurrency: 1, } payload := model.JobCreatePayload{ - ClientID: "123", - Job: j, + ClientID: "123", + APIVersion: j.APIVersion, + Spec: &j.Spec, } _, err := node.RequesterNode.SubmitJob(ctx, payload) diff --git a/pkg/verifier/deterministic/verifier.go b/pkg/verifier/deterministic/verifier.go index bb0e05e156..342a40d765 100644 --- a/pkg/verifier/deterministic/verifier.go +++ b/pkg/verifier/deterministic/verifier.go @@ -52,7 +52,7 @@ func (deterministicVerifier *DeterministicVerifier) GetShardResultPath( _ context.Context, shard model.JobShard, ) (string, error) { - return deterministicVerifier.results.EnsureShardResultsDir(shard.Job.ID, shard.Index) + return deterministicVerifier.results.EnsureShardResultsDir(shard.Job.Metadata.ID, shard.Index) } func (deterministicVerifier *DeterministicVerifier) GetShardProposal( @@ -60,18 +60,18 @@ func (deterministicVerifier *DeterministicVerifier) GetShardProposal( shard model.JobShard, shardResultPath string, ) ([]byte, error) { - j, err := deterministicVerifier.stateResolver.GetJob(ctx, shard.Job.ID) + j, err := deterministicVerifier.stateResolver.GetJob(ctx, shard.Job.Metadata.ID) if err != nil { return nil, err } - if len(j.RequesterPublicKey) == 0 { + if len(j.Status.Requester.RequesterPublicKey) == 0 { return nil, fmt.Errorf("no RequesterPublicKey found in the job") } dirHash, err := dirhash.HashDir(shardResultPath, "results", dirhash.Hash1) if err != nil { return nil, err } - encryptedHash, err := deterministicVerifier.encrypter(ctx, []byte(dirHash), j.RequesterPublicKey) + encryptedHash, err := deterministicVerifier.encrypter(ctx, []byte(dirHash), j.Status.Requester.RequesterPublicKey) if err != nil { return nil, err } @@ -131,7 +131,7 @@ func (deterministicVerifier *DeterministicVerifier) getHashGroups( existingArray = []*verifier.VerifierResult{} } hashGroups[hash] = append(existingArray, &verifier.VerifierResult{ - JobID: shard.Job.ID, + JobID: shard.Job.Metadata.ID, NodeID: shardState.NodeID, ShardIndex: shardState.ShardIndex, Verified: false, @@ -146,7 +146,7 @@ func (deterministicVerifier *DeterministicVerifier) verifyShard( shard model.JobShard, shardStates []model.JobShardState, ) ([]verifier.VerifierResult, error) { - confidence := shard.Job.Deal.Confidence + confidence := shard.Job.Spec.Deal.Confidence largestGroupHash := "" largestGroupSize := 0 @@ -207,14 +207,14 @@ func (deterministicVerifier *DeterministicVerifier) VerifyShard( ctx, span := system.GetTracer().Start(ctx, "pkg/verifier/deterministic.VerifyShard") defer span.End() - jobState, err := deterministicVerifier.stateResolver.GetJobState(ctx, shard.Job.ID) + jobState, err := deterministicVerifier.stateResolver.GetJobState(ctx, shard.Job.Metadata.ID) if err != nil { return nil, err } shardStates := job.GetStatesForShardIndex(jobState, shard.Index) if len(shardStates) == 0 { - return nil, fmt.Errorf("job (%s) has no shard state for shard index %d", shard.Job.ID, shard.Index) + return nil, fmt.Errorf("job (%s) has no shard state for shard index %d", shard.Job.Metadata.ID, shard.Index) } shardResults, err := deterministicVerifier.verifyShard(ctx, shard, shardStates) diff --git a/pkg/verifier/noop/verifier.go b/pkg/verifier/noop/verifier.go index 65a4f00d9d..5d86fce2c2 100644 --- a/pkg/verifier/noop/verifier.go +++ b/pkg/verifier/noop/verifier.go @@ -69,7 +69,7 @@ func (noopVerifier *NoopVerifier) GetShardResultPath( _ context.Context, shard model.JobShard, ) (string, error) { - return noopVerifier.results.EnsureShardResultsDir(shard.Job.ID, shard.Index) + return noopVerifier.results.EnsureShardResultsDir(shard.Job.Metadata.ID, shard.Index) } func (noopVerifier *NoopVerifier) GetShardProposal( @@ -102,13 +102,13 @@ func (noopVerifier *NoopVerifier) VerifyShard( defer span.End() results := []verifier.VerifierResult{} - jobState, err := noopVerifier.stateResolver.GetJobState(ctx, shard.Job.ID) + jobState, err := noopVerifier.stateResolver.GetJobState(ctx, shard.Job.Metadata.ID) if err != nil { return results, err } shardStates := job.GetStatesForShardIndex(jobState, shard.Index) if len(shardStates) == 0 { - return nil, fmt.Errorf("job (%s) has no shard state for shard index %d", shard.Job.ID, shard.Index) + return nil, fmt.Errorf("job (%s) has no shard state for shard index %d", shard.Job.Metadata.ID, shard.Index) } for _, shardState := range shardStates { //nolint:gocritic @@ -116,7 +116,7 @@ func (noopVerifier *NoopVerifier) VerifyShard( continue } results = append(results, verifier.VerifierResult{ - JobID: shard.Job.ID, + JobID: shard.Job.Metadata.ID, NodeID: shardState.NodeID, ShardIndex: shardState.ShardIndex, Verified: true, diff --git a/testdata/job-invalid.yml b/testdata/job-invalid.yml index 01032cabe0..2fba44435c 100644 --- a/testdata/job-invalid.yml +++ b/testdata/job-invalid.yml @@ -17,7 +17,7 @@ Spec: Sharding: BatchSize: 1 GlobPatternBasePath: /inputs -Deal: - Concurrency: 1 - Confidence: 0 - MinBids: 0 + Deal: + Concurrency: 1 + Confidence: 0 + MinBids: 0 diff --git a/testdata/job.yaml b/testdata/job.yaml index ab38744f23..7a70e9cb71 100644 --- a/testdata/job.yaml +++ b/testdata/job.yaml @@ -16,7 +16,7 @@ Spec: Sharding: BatchSize: 1 GlobPatternBasePath: /inputs -Deal: - Concurrency: 1 - Confidence: 0 - MinBids: 0 + Deal: + Concurrency: 1 + Confidence: 0 + MinBids: 0 \ No newline at end of file