SPRXCLT-23: support query params and conditional PUT/DELETE in putEmptyObject#312
Merged
bert-e merged 2 commits intoMay 14, 2026
Conversation
Contributor
Hello jonathan-gramain,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
…tyObject Changes to lib/sproxyd.js: - _createRequestHeader: append query string from params.query to request path - putEmptyObject: accept params object (params.headers, params.query); return x-scal-version from PUT response as second callback argument (not the key) - putEmptyObject: fix non-streaming error handling to propagate expected errors (err.isExpected) rather than always wrapping in InternalError - deleteWithParams: new method — version-conditional DELETE via params.query.version; avoids changing the existing delete() signature for backward compatibility Changes to tests/unit/sproxyd.js: - test server: support conditional PUT/DELETE (version param, If-None-Match: *), track per-key versions, return x-scal-version in PUT/HEAD responses - update existing putEmptyObject and conditional-PUT tests for new signatures - add three deleteWithParams tests (matching version, wrong version, absent key) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1f619df to
9aae3ad
Compare
tcarmet
approved these changes
May 14, 2026
dvasilas
approved these changes
May 14, 2026
Contributor
Author
|
/approve |
Contributor
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue SPRXCLT-23. Goodbye jonathan-gramain. The following options are set: approve |
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.
Summary
_createRequestHeader: append query string fromparams.queryto the request pathputEmptyObject: acceptparamsobject (params.headers,params.query); returnx-scal-versionfrom PUT response as second callback argument (not the key)putEmptyObject: fix non-streaming error handling to propagate expected errors (err.isExpected) rather than always wrapping inInternalErrordeleteWithParams: new method — version-conditional DELETE viaparams.query.version; avoids changing the existingdelete()signature for backward compatibilityTests
If-None-Match: *), track per-key versions, returnx-scal-versionin PUT/HEAD responsesputEmptyObjectand conditional-PUT tests for new signaturesdeleteWithParamstests (matching version, wrong version, absent key)Motivation
Required by MD-1241 (
lib/ring/Lease.jsin the metadata service), which uses these capabilities to implement a distributed lease backed by a RING object with atomic acquire, steal, renew, and release.Test plan
yarn testpasses (existing + new unit tests)🤖 Generated with Claude Code