-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: worker tests, cargo nextest, and better handle on workflow …
…progress (#137) Includes: * foregin_key relationships and join table for many to many workflow(s) to receipts(s) * make `progress` defined by receipts (as Cids) completed * handling of db, fallback to libp2p for workflow information and progress * tests, tests, tests
- Loading branch information
Zeeshan Lakhani
authored
Jun 8, 2023
1 parent
f6c5671
commit ec5dd3a
Showing
30 changed files
with
1,171 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
12 changes: 0 additions & 12 deletions
12
homestar-runtime/migrations/2022-12-11-183928_create_receipts/up.sql
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
homestar-runtime/migrations/2023-06-04-135955_create_workflows/down.sql
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 @@ | ||
DROP TABLE workflows; |
4 changes: 4 additions & 0 deletions
4
homestar-runtime/migrations/2023-06-04-135955_create_workflows/up.sql
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,4 @@ | ||
CREATE TABLE workflows ( | ||
cid TEXT NOT NULL PRIMARY KEY, | ||
num_tasks INTEGER NOT NULL | ||
); |
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
homestar-runtime/migrations/2023-06-04-183928_create_receipts/up.sql
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,12 @@ | ||
CREATE TABLE receipts ( | ||
cid TEXT NOT NULL PRIMARY KEY, | ||
ran TEXT NOT NULL, | ||
instruction TEXT NOT NULL, | ||
out BLOB NOT NULL, | ||
meta BLOB NOT NULL, | ||
issuer TEXT, | ||
prf BLOB NOT NULL, | ||
version TEXT NOT NULL | ||
); | ||
|
||
CREATE INDEX instruction_index ON receipts (instruction); |
1 change: 1 addition & 0 deletions
1
homestar-runtime/migrations/2023-06-07-023422_create_workflows_receipts/down.sql
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 @@ | ||
DROP TABLE workflows_receipts; |
5 changes: 5 additions & 0 deletions
5
homestar-runtime/migrations/2023-06-07-023422_create_workflows_receipts/up.sql
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,5 @@ | ||
CREATE TABLE workflows_receipts ( | ||
workflow_cid TEXT NOT NULL REFERENCES workflows(cid), | ||
receipt_cid TEXT NOT NULL REFERENCES receipts(cid), | ||
PRIMARY KEY(workflow_cid, receipt_cid) | ||
); |
Oops, something went wrong.