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(pdp): add endpoint to poll for completed upload #304

Merged

Conversation

hannahhoward
Copy link

@hannahhoward hannahhoward commented Oct 27, 2024

Goals

This enables a service using PDP to query based on its upload parameters and poll for upload completion. The primary requirement is this should only return a piece cid if there is a retrievable piece for the given parameters.

Implementation

  • Add an provides an endpoint to look up a piece cid for a given set of upload parameters. It will only respond if the piece exists. It will also mark if the piece is retriavable and whether it's ready for PDP aggregation. This largely mimics some initial logic from POST /pdp/piece that determines if it's 201 created (new upload) or 200 (existing upload)
  • Add docs for new endpoint
  • Correct one comment that appears to refer to the wrong table.

For discussion

Currently, this will succeed as soon as the piece finishes uploading, and it will seperately note if the piece is retrievable and ready for aggregation. A previous version would 404 if the piece was not retrievable.

@hannahhoward hannahhoward force-pushed the feat/pdp-check-handler branch from 82aa59b to f230bf4 Compare October 27, 2024 23:35
@hannahhoward hannahhoward mentioned this pull request Oct 28, 2024
27 tasks
Copy link
Collaborator

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Seems reasonable

@magik6k magik6k merged commit 8fe488c into filecoin-project:feat/pdp Oct 30, 2024
13 of 14 checks passed
magik6k pushed a commit that referenced this pull request Oct 30, 2024
* feat(pdp): add handler to check for piece cid status

* feat(pdp): add handler to check for upload exists
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