-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: reuse http/put and blob/accept receipts when available #1495
Conversation
packages/upload-client/src/blob.js
Outdated
ran: nextTasks.put.task.cid, | ||
result: { ok: {} }, | ||
}) | ||
} | ||
const httpPutConcludeInvocation = createConcludeInvocation( | ||
issuer, | ||
// @ts-expect-error object of type unknown | ||
audience, | ||
httpPutReceipt | ||
) | ||
const ucanConclude = await httpPutConcludeInvocation.execute(conn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking this call should only be executed if we're missing a http/put receipt. however, I'm leaving it here as a "validation" the receipt we got makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I think we don't need to conclude if we already have the receipt for a concluded task.
@vasco-santos is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we do not need. This can be from other uploaded content from other user. That is why we pass the seed key so that the issuer of invocation is content specific and not user/space specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed
packages/upload-client/src/blob.js
Outdated
ran: nextTasks.put.task.cid, | ||
result: { ok: {} }, | ||
}) | ||
} | ||
const httpPutConcludeInvocation = createConcludeInvocation( | ||
issuer, | ||
// @ts-expect-error object of type unknown | ||
audience, | ||
httpPutReceipt | ||
) | ||
const ucanConclude = await httpPutConcludeInvocation.execute(conn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I think we don't need to conclude if we already have the receipt for a concluded task.
@vasco-santos is that right?
32fc658
to
8f63472
Compare
🤖 I have created a release *beep* *boop* --- ## [16.1.1](upload-client-v16.1.0...upload-client-v16.1.1) (2024-06-05) ### Fixes * reuse http/put and blob/accept receipts when available ([#1495](#1495)) ([416802e](416802e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
From @vasco-santos: