fix(client): call versioned /v1/shards endpoint for shard uploads#879
Open
assafvayner wants to merge 1 commit into
Open
fix(client): call versioned /v1/shards endpoint for shard uploads#879assafvayner wants to merge 1 commit into
assafvayner wants to merge 1 commit into
Conversation
67ed9f3 to
33bae8d
Compare
upload_shard was the only CAS call still hitting the unversioned `/shards` alias; every other endpoint (chunks, reconstructions, xorbs, file-chunk-hashes) already carries a version prefix. The CAS server serves root `/shards` only as a backwards-compat alias that it intends to remove once clients stop using it, so switch to the canonical `/v1/shards`. This restores the shard portion of #568, which was inadvertently reverted by the long-lived branch merged in #410. Also register `/v1/shards` on the simulation mock server so the shard-upload tests exercise the versioned path.
33bae8d to
9a4ba3a
Compare
XciD
approved these changes
Jun 27, 2026
seanses
reviewed
Jun 28, 2026
| @@ -193,7 +194,6 @@ impl LocalServer { | |||
| ) | |||
| // Routes used by RemoteClient without /v1/ prefix | |||
| .route("/reconstructions", get(handlers::batch_get_reconstruction)) | |||
Collaborator
There was a problem hiding this comment.
Might as well remove this route
seanses
reviewed
Jun 28, 2026
| @@ -193,7 +194,6 @@ impl LocalServer { | |||
| ) | |||
| // Routes used by RemoteClient without /v1/ prefix | |||
seanses
approved these changes
Jun 28, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shard-upload client was still calling the old unversioned
/shardspath while every other CAS endpoint (chunks, reconstructions, xorbs, file-chunk-hashes) already uses a version prefix. This switchesupload_shardto the canonical/v1/shardsand registers that route on the simulation mock server.Note
Low Risk
Small URL change only; risk is limited to environments that still expose only unversioned
/shardswithout/v1/shards.Overview
Shard uploads from
RemoteClient::upload_shardnow POST to/v1/shardsinstead of the legacy unversioned/shards, matching other versioned CAS routes (/v1/chunks,/v1/xorbs, etc.).The simulation local server registers
POST /v1/shardsunder the/v1router and drops the root-level/shardsalias so local/integration tests hit the same path the client uses.Reviewed by Cursor Bugbot for commit 9a4ba3a. Bugbot is set up for automated code reviews on this repo. Configure here.