Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add receipts endpoint #275

Merged
merged 3 commits into from
Nov 13, 2023
Merged

feat: add receipts endpoint #275

merged 3 commits into from
Nov 13, 2023

Conversation

vasco-santos
Copy link
Contributor

@vasco-santos vasco-santos commented Nov 13, 2023

Adds receipts endpoint with redirect to workflow bucket where receipt for asked task will be available.

Bucket was made public to accept GETs, you can see the generated policy here . IAM Role has general access to the bucket, while "Principal": "*" can perform GetObject.

Integration tests were added to inspect receipt from filecoin/offer invocation

Copy link

seed-deploy bot commented Nov 13, 2023

View stack outputs

@@ -116,12 +116,12 @@ export const useInvocationStore = (s3client, bucketName) => {
})
const listObject = await s3client.send(listObjectCmd)
const carEntry = listObject.Contents?.find(
content => content.Key?.endsWith('.workflow')
content => content.Key?.endsWith('.out')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱 this had a bug, but this code path was not being used. See https://github.com/web3-storage/w3infra/blob/main/docs/ucan-invocation-stream.md#buckets as this first was .workflow but then was iterated to .in and .out

@vasco-santos vasco-santos marked this pull request as ready for review November 13, 2023 13:42
@seed-deploy seed-deploy bot temporarily deployed to pr275 November 13, 2023 13:42 Inactive
@vasco-santos vasco-santos requested review from Gozala and alanshaw and removed request for Gozala November 13, 2023 13:52
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/

@vasco-santos vasco-santos merged commit abe40ff into main Nov 13, 2023
1 check passed
@vasco-santos vasco-santos deleted the feat/receipts-endpoint branch November 13, 2023 14:26
vasco-santos added a commit to storacha/w3up that referenced this pull request Nov 15, 2023
Adds `getReceipt(taskCid)` support in client after endpoint added into
w3filecoin earlier this week
storacha/w3infra#275

When you get a CID from an invocation, you can look for its receipt and
go through receipt chain if you like from the client :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants