-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<img width="1645" alt="Screenshot 2022-11-18 at 17 37 48" src="https://user-images.githubusercontent.com/4340327/202755829-1a380d99-2fd5-48ea-944a-cd9959354875.png">
- Loading branch information
1 parent
33be34c
commit 2823057
Showing
29 changed files
with
5,006 additions
and
82 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This folder contains markdown files to use as descriptions in OpenAPI/Swagger annotations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
Events (e.g. Created, Bid, BidAccepted, ..., ResultsAccepted, ResultsPublished) are useful to track the progress of a job. | ||
|
||
Example response (truncated): | ||
```json | ||
{ | ||
"events": [ | ||
{ | ||
"APIVersion": "V1beta1", | ||
"JobID": "9304c616-291f-41ad-b862-54e133c0149e", | ||
"ClientID": "ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51", | ||
"SourceNodeID": "QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF", | ||
"EventName": "Created", | ||
"Spec": { | ||
"Engine": "Docker", | ||
"Verifier": "Noop", | ||
"Publisher": "Estuary", | ||
"Docker": { | ||
"Image": "ubuntu", | ||
"Entrypoint": [ | ||
"date" | ||
] | ||
}, | ||
"Language": { | ||
"JobContext": {} | ||
}, | ||
"Wasm": {}, | ||
"Resources": { | ||
"GPU": "" | ||
}, | ||
"Timeout": 1800, | ||
"outputs": [ | ||
{ | ||
"StorageSource": "IPFS", | ||
"Name": "outputs", | ||
"path": "/outputs" | ||
} | ||
], | ||
"Sharding": { | ||
"BatchSize": 1, | ||
"GlobPatternBasePath": "/inputs" | ||
} | ||
}, | ||
"JobExecutionPlan": { | ||
"ShardsTotal": 1 | ||
}, | ||
"Deal": { | ||
"Concurrency": 1 | ||
}, | ||
"VerificationResult": {}, | ||
"PublishedResult": {}, | ||
"EventTime": "2022-11-17T13:32:55.331375351Z", | ||
"SenderPublicKey": "..." | ||
}, | ||
... | ||
{ | ||
"JobID": "9304c616-291f-41ad-b862-54e133c0149e", | ||
"SourceNodeID": "QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF", | ||
"TargetNodeID": "QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"EventName": "ResultsAccepted", | ||
"Spec": { | ||
"Docker": {}, | ||
"Language": { | ||
"JobContext": {} | ||
}, | ||
"Wasm": {}, | ||
"Resources": { | ||
"GPU": "" | ||
}, | ||
"Sharding": {} | ||
}, | ||
"JobExecutionPlan": {}, | ||
"Deal": {}, | ||
"VerificationResult": { | ||
"Complete": true, | ||
"Result": true | ||
}, | ||
"PublishedResult": {}, | ||
"EventTime": "2022-11-17T13:32:55.707825569Z", | ||
"SenderPublicKey": "..." | ||
}, | ||
{ | ||
"JobID": "9304c616-291f-41ad-b862-54e133c0149e", | ||
"SourceNodeID": "QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"EventName": "ResultsPublished", | ||
"Spec": { | ||
"Docker": {}, | ||
"Language": { | ||
"JobContext": {} | ||
}, | ||
"Wasm": {}, | ||
"Resources": { | ||
"GPU": "" | ||
}, | ||
"Sharding": {} | ||
}, | ||
"JobExecutionPlan": {}, | ||
"Deal": {}, | ||
"VerificationResult": {}, | ||
"PublishedResult": { | ||
"StorageSource": "IPFS", | ||
"Name": "job-9304c616-291f-41ad-b862-54e133c0149e-shard-0-host-QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"CID": "QmTVmC7JBD2ES2qGPqBNVWnX1KeEPNrPGb7rJ8cpFgtefe" | ||
}, | ||
"EventTime": "2022-11-17T13:32:55.756658941Z", | ||
"SenderPublicKey": "..." | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
Returns the first (sorted) #`max_jobs` jobs that belong to the `client_id` passed in the body payload (by default). | ||
If `return_all` is set to true, it returns all jobs on the Bacalhau network. | ||
|
||
If `id` is set, it returns only the job with that ID. | ||
|
||
Example response: | ||
```json | ||
{ | ||
"jobs": [ | ||
{ | ||
"APIVersion": "V1beta1", | ||
"ID": "9304c616-291f-41ad-b862-54e133c0149e", | ||
"RequesterNodeID": "QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF", | ||
"RequesterPublicKey": "...", | ||
"ClientID": "ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51", | ||
"Spec": { | ||
"Engine": "Docker", | ||
"Verifier": "Noop", | ||
"Publisher": "Estuary", | ||
"Docker": { | ||
"Image": "ubuntu", | ||
"Entrypoint": [ | ||
"date" | ||
] | ||
}, | ||
"Language": { | ||
"JobContext": {} | ||
}, | ||
"Wasm": {}, | ||
"Resources": { | ||
"GPU": "" | ||
}, | ||
"Timeout": 1800, | ||
"outputs": [ | ||
{ | ||
"StorageSource": "IPFS", | ||
"Name": "outputs", | ||
"path": "/outputs" | ||
} | ||
], | ||
"Sharding": { | ||
"BatchSize": 1, | ||
"GlobPatternBasePath": "/inputs" | ||
} | ||
}, | ||
"Deal": { | ||
"Concurrency": 1 | ||
}, | ||
"ExecutionPlan": { | ||
"ShardsTotal": 1 | ||
}, | ||
"CreatedAt": "2022-11-17T13:32:55.33837275Z", | ||
"JobState": { | ||
"Nodes": { | ||
"QmSyJ8VUd4YSPwZFJSJsHmmmmg7sd4BAc2yHY73nisJo86": { | ||
"Shards": { | ||
"0": { | ||
"NodeId": "QmSyJ8VUd4YSPwZFJSJsHmmmmg7sd4BAc2yHY73nisJo86", | ||
"State": "Cancelled", | ||
"VerificationResult": {}, | ||
"PublishedResults": {} | ||
} | ||
} | ||
}, | ||
"QmYgxZiySj3MRkwLSL4X2MF5F9f2PMhAE3LV49XkfNL1o3": { | ||
"Shards": { | ||
"0": { | ||
"NodeId": "QmYgxZiySj3MRkwLSL4X2MF5F9f2PMhAE3LV49XkfNL1o3", | ||
"State": "Cancelled", | ||
"VerificationResult": {}, | ||
"PublishedResults": {} | ||
} | ||
} | ||
}, | ||
"QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL": { | ||
"Shards": { | ||
"0": { | ||
"NodeId": "QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"State": "Completed", | ||
"Status": "Got results proposal of length: 0", | ||
"VerificationResult": { | ||
"Complete": true, | ||
"Result": true | ||
}, | ||
"PublishedResults": { | ||
"StorageSource": "IPFS", | ||
"Name": "job-9304c616-291f-41ad-b862-54e133c0149e-shard-0-host-QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"CID": "QmTVmC7JBD2ES2qGPqBNVWnX1KeEPNrPGb7rJ8cpFgtefe" | ||
}, | ||
"RunOutput": { | ||
"stdout": "Thu Nov 17 13:32:55 UTC 2022\n", | ||
"stdouttruncated": false, | ||
"stderr": "", | ||
"stderrtruncated": false, | ||
"exitCode": 0, | ||
"runnerError": "" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"APIVersion": "V1beta1", | ||
"ID": "92d5d4ee-3765-4f78-8353-623f5f26df08", | ||
"RequesterNodeID": "QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF", | ||
"RequesterPublicKey": "...", | ||
"ClientID": "ac13188e93c97a9c2e7cf8e86c7313156a73436036f30da1ececc2ce79f9ea51", | ||
"Spec": { | ||
"Engine": "Docker", | ||
"Verifier": "Noop", | ||
"Publisher": "Estuary", | ||
"Docker": { | ||
"Image": "ubuntu", | ||
"Entrypoint": [ | ||
"sleep", | ||
"4" | ||
] | ||
}, | ||
"Language": { | ||
"JobContext": {} | ||
}, | ||
"Wasm": {}, | ||
"Resources": { | ||
"GPU": "" | ||
}, | ||
"Timeout": 1800, | ||
"outputs": [ | ||
{ | ||
"StorageSource": "IPFS", | ||
"Name": "outputs", | ||
"path": "/outputs" | ||
} | ||
], | ||
"Sharding": { | ||
"BatchSize": 1, | ||
"GlobPatternBasePath": "/inputs" | ||
} | ||
}, | ||
"Deal": { | ||
"Concurrency": 1 | ||
}, | ||
"ExecutionPlan": { | ||
"ShardsTotal": 1 | ||
}, | ||
"CreatedAt": "2022-11-17T13:29:01.871140291Z", | ||
"JobState": { | ||
"Nodes": { | ||
"QmSyJ8VUd4YSPwZFJSJsHmmmmg7sd4BAc2yHY73nisJo86": { | ||
"Shards": { | ||
"0": { | ||
"NodeId": "QmSyJ8VUd4YSPwZFJSJsHmmmmg7sd4BAc2yHY73nisJo86", | ||
"State": "Cancelled", | ||
"VerificationResult": {}, | ||
"PublishedResults": {} | ||
} | ||
} | ||
}, | ||
"QmYgxZiySj3MRkwLSL4X2MF5F9f2PMhAE3LV49XkfNL1o3": { | ||
"Shards": { | ||
"0": { | ||
"NodeId": "QmYgxZiySj3MRkwLSL4X2MF5F9f2PMhAE3LV49XkfNL1o3", | ||
"State": "Completed", | ||
"Status": "Got results proposal of length: 0", | ||
"VerificationResult": { | ||
"Complete": true, | ||
"Result": true | ||
}, | ||
"PublishedResults": { | ||
"StorageSource": "IPFS", | ||
"Name": "job-92d5d4ee-3765-4f78-8353-623f5f26df08-shard-0-host-QmYgxZiySj3MRkwLSL4X2MF5F9f2PMhAE3LV49XkfNL1o3", | ||
"CID": "QmWUXBndMuq2G6B6ndQCmkRHjZ6CvyJ8qLxXBG3YsSFzQG" | ||
}, | ||
"RunOutput": { | ||
"stdout": "", | ||
"stdouttruncated": false, | ||
"stderr": "", | ||
"stderrtruncated": false, | ||
"exitCode": 0, | ||
"runnerError": "" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
As described in the [architecture docs](https://docs.bacalhau.org/about-bacalhau/architecture), each node is connected to a number of peer nodes. | ||
|
||
Example response: | ||
```json | ||
{ | ||
"bacalhau-job-event": [ | ||
"QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"QmXaXu9N5GNetatsvwnTfQqNtSeKAD6uCmarbh3LMRYAcF", | ||
"QmVAb7r2pKWCuyLpYWoZr9syhhFnTWeFaByHdb8PkkhLQG", | ||
"QmUDAXvv31WPZ8U9CzuRTMn9iFGiopGE7rHiah1X8a6PkT", | ||
"QmSyJ8VUd4YSPwZFJSJsHmmmmg7sd4BAc2yHY73nisJo86" | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Example response: | ||
|
||
```json | ||
{ | ||
"results": [ | ||
{ | ||
"NodeID": "QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"Data": { | ||
"StorageSource": "IPFS", | ||
"Name": "job-9304c616-291f-41ad-b862-54e133c0149e-shard-0-host-QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"CID": "QmTVmC7JBD2ES2qGPqBNVWnX1KeEPNrPGb7rJ8cpFgtefe" | ||
} | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Example response: | ||
|
||
```json | ||
{ | ||
"state": { | ||
"Nodes": { | ||
"QmSyJ8VUd4YSPwZFJSJsHmmmmg7sd4BAc2yHY73nisJo86": { | ||
"Shards": { | ||
"0": { | ||
"NodeId": "QmSyJ8VUd4YSPwZFJSJsHmmmmg7sd4BAc2yHY73nisJo86", | ||
"State": "Cancelled", | ||
"VerificationResult": {}, | ||
"PublishedResults": {} | ||
} | ||
} | ||
}, | ||
"QmYgxZiySj3MRkwLSL4X2MF5F9f2PMhAE3LV49XkfNL1o3": { | ||
"Shards": { | ||
"0": { | ||
"NodeId": "QmYgxZiySj3MRkwLSL4X2MF5F9f2PMhAE3LV49XkfNL1o3", | ||
"State": "Cancelled", | ||
"VerificationResult": {}, | ||
"PublishedResults": {} | ||
} | ||
} | ||
}, | ||
"QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL": { | ||
"Shards": { | ||
"0": { | ||
"NodeId": "QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"State": "Completed", | ||
"Status": "Got results proposal of length: 0", | ||
"VerificationResult": { | ||
"Complete": true, | ||
"Result": true | ||
}, | ||
"PublishedResults": { | ||
"StorageSource": "IPFS", | ||
"Name": "job-9304c616-291f-41ad-b862-54e133c0149e-shard-0-host-QmdZQ7ZbhnvWY1J12XYKGHApJ6aufKyLNSvf8jZBrBaAVL", | ||
"CID": "QmTVmC7JBD2ES2qGPqBNVWnX1KeEPNrPGb7rJ8cpFgtefe" | ||
}, | ||
"RunOutput": { | ||
"stdout": "Thu Nov 17 13:32:55 UTC 2022\n", | ||
"stdouttruncated": false, | ||
"stderr": "", | ||
"stderrtruncated": false, | ||
"exitCode": 0, | ||
"runnerError": "" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` |
Oops, something went wrong.