Skip to content

feat: add upload/shard/list capability and implementation#680

Merged
alanshaw merged 13 commits intomainfrom
ash/feat/upload-shard-list
Mar 4, 2026
Merged

feat: add upload/shard/list capability and implementation#680
alanshaw merged 13 commits intomainfrom
ash/feat/upload-shard-list

Conversation

@alanshaw
Copy link
Copy Markdown
Member

@alanshaw alanshaw commented Feb 25, 2026

Adds a capability for (paginated) listing of shards for an upload.

When an upload is VERY large, it will be split into many shards. We have made changes to support this when invoking upload/add, but when invoking upload/list it is easy to exceed the max response size (~6MB) since all shard CIDs are returned for every upload.

This PR alters the upload/list response so that it NEVER returns shard CIDs. Instead, to obtain shard CIDs for a given upload you must invoke upload/shard/list, passing the upload root CID.

BREAKING CHANGE: Return values for upload/add, upload/list and upload/get no longer include a shards field that contains the CIDs of the shards of the upload. You must now call upload/shard/list to obtain shards for an upload. This is not technically a breaking change because the field was optional. However, any API consumer relying on the field to contain the shard listing for a given upload will no longer show shards for a given upload.

@alanshaw alanshaw temporarily deployed to preview-680/merge February 26, 2026 10:24 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 26, 2026

@alanshaw alanshaw temporarily deployed to preview-680/merge February 26, 2026 14:26 — with GitHub Actions Inactive
@alanshaw alanshaw marked this pull request as ready for review February 26, 2026 16:05
@alanshaw alanshaw requested a review from travis as a code owner February 26, 2026 16:05
@alanshaw alanshaw requested review from a team and removed request for travis February 26, 2026 16:05
@alanshaw alanshaw temporarily deployed to preview-680/merge February 26, 2026 16:08 — with GitHub Actions Inactive
Copy link
Copy Markdown
Member

@Peeja Peeja left a comment

Choose a reason for hiding this comment

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

Excellent!

Comment on lines +979 to +980
export interface UploadShardListSuccess
extends Omit<ListResponse<UnknownLink>, 'before' | 'after'> {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question (non-blocking): Why does this one not have a before and after? Just not worth implementing the bi-directional pagination? Maybe we should have a separate generic type that isn't bi-directional, and then make a bi-directional one by adding before and after to it, just for clarity when reading the code. Or maybe that's not worth it.

Copy link
Copy Markdown
Member Author

@alanshaw alanshaw Feb 26, 2026

Choose a reason for hiding this comment

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

Yeah it's just complexity I wasn't sure if we wanted for shard listing. We can add it later if needs be. I will add the separate type as suggested.

@Peeja
Copy link
Copy Markdown
Member

Peeja commented Feb 26, 2026

Oh! You'll want to add a release plan, too.

@alanshaw alanshaw temporarily deployed to preview-680/merge March 2, 2026 10:11 — with GitHub Actions Inactive
@alanshaw alanshaw temporarily deployed to preview-680/merge March 2, 2026 10:23 — with GitHub Actions Inactive
@alanshaw alanshaw temporarily deployed to preview-680/merge March 3, 2026 14:46 — with GitHub Actions Inactive
@alanshaw alanshaw deployed to preview-680/merge March 3, 2026 16:18 — with GitHub Actions Active
alanshaw added a commit to storacha/w3infra that referenced this pull request Mar 4, 2026
Changes to the upload table implementation to allow shards to be listed
for a given upload.

refs storacha/upload-service#680
@alanshaw alanshaw merged commit 63bf146 into main Mar 4, 2026
5 checks passed
@alanshaw alanshaw deleted the ash/feat/upload-shard-list branch March 4, 2026 09:32
alanshaw pushed a commit that referenced this pull request Mar 4, 2026
…9.99, @storacha/ui-core@2.4.162, @storacha/filecoin-client@1.0.19, @storacha/access@1.6.8, @storacha/upload-client@1.4.0, @storacha/capabilities@2.3.0, @storacha/filecoin-api@2.1.4, @storacha/client@2.1.0, @storacha/blob-index@1.2.8, @storacha/upload-api@3.2.0, @storacha/router@1.1.5, @storacha/cli@2.1.0 (#683)

## @storacha/encrypt-upload-client@1.1.79 (2026-03-04)

### 🧱 Updated Dependencies

- Updated @storacha/upload-client to 1.4.0
- Updated @storacha/capabilities to 2.3.0
- Updated @storacha/client to 2.1.0

## @storacha/ui-react@2.9.99 (2026-03-04)

### 🧱 Updated Dependencies

- Updated @storacha/encrypt-upload-client to 1.1.79
- Updated @storacha/ui-core to 2.4.162

## @storacha/ui-core@2.4.162 (2026-03-04)

### 🧱 Updated Dependencies

- Updated @storacha/access to 1.6.8
- Updated @storacha/client to 2.1.0

## @storacha/filecoin-client@1.0.19 (2026-03-04)

### 🧱 Updated Dependencies

- Updated @storacha/capabilities to 2.3.0

## @storacha/access@1.6.8 (2026-03-04)

### 🧱 Updated Dependencies

- Updated @storacha/capabilities to 2.3.0

## @storacha/upload-client@1.4.0 (2026-03-04)

### 🚀 Features

- feat: add `upload/shard/list` capability and implementation
([#680](#680))

### 🧱 Updated Dependencies

- Updated @storacha/filecoin-client to 1.0.19
- Updated @storacha/capabilities to 2.3.0
- Updated @storacha/blob-index to 1.2.8

### ❤️ Thank You

- ash

## @storacha/capabilities@2.3.0 (2026-03-04)

### 🚀 Features

- feat: add `upload/shard/list` capability and implementation
([#680](#680))

### ❤️ Thank You

- ash

## @storacha/filecoin-api@2.1.4 (2026-03-04)

### 🧱 Updated Dependencies

- Updated @storacha/filecoin-client to 1.0.19
- Updated @storacha/capabilities to 2.3.0
- Updated @storacha/router to 1.1.5

## @storacha/client@2.1.0 (2026-03-04)

### 🚀 Features

- feat: add `upload/shard/list` capability and implementation
([#680](#680))

### 🧱 Updated Dependencies

- Updated @storacha/filecoin-client to 1.0.19
- Updated @storacha/access to 1.6.8
- Updated @storacha/upload-client to 1.4.0
- Updated @storacha/capabilities to 2.3.0
- Updated @storacha/blob-index to 1.2.8
- Updated @storacha/upload-api to 3.2.0

### ❤️ Thank You

- ash

## @storacha/blob-index@1.2.8 (2026-03-04)

### 🧱 Updated Dependencies

- Updated @storacha/capabilities to 2.3.0

## @storacha/upload-api@3.2.0 (2026-03-04)

### 🚀 Features

- feat: add `upload/shard/list` capability and implementation
([#680](#680))

### 🧱 Updated Dependencies

- Updated @storacha/access to 1.6.8
- Updated @storacha/capabilities to 2.3.0
- Updated @storacha/filecoin-api to 2.1.4
- Updated @storacha/blob-index to 1.2.8
- Updated @storacha/router to 1.1.5

### ❤️ Thank You

- ash

## @storacha/router@1.1.5 (2026-03-04)

### 🧱 Updated Dependencies

- Updated @storacha/capabilities to 2.3.0

## @storacha/cli@2.1.0 (2026-03-04)

### 🚀 Features

- feat: add `upload/shard/list` capability and implementation
([#680](#680))

### 🧱 Updated Dependencies

- Updated @storacha/access to 1.6.8
- Updated @storacha/capabilities to 2.3.0
- Updated @storacha/client to 2.1.0
- Updated @storacha/upload-api to 3.2.0

### ❤️ Thank You

- ash

Co-authored-by: Rachabot <rachabot@storacha.network>
alanshaw pushed a commit that referenced this pull request Mar 4, 2026
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](console-v2.20.2...console-v3.0.0)
(2026-03-04)


### ⚠ BREAKING CHANGES

* Return values for `upload/add`, `upload/list` and `upload/get` no
longer include a `shards` field that contains the CIDs of the shards of
the upload. You must now call `upload/shard/list` to obtain shards for
an upload. This is not technically a breaking change because the field
was optional. However, any API consumer relying on the field to contain
the shard listing for a given upload will no longer show shards for a
given upload.

### Features

* add `upload/shard/list` capability and implementation
([#680](#680))
([63bf146](63bf146))

---
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>
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