Skip to content

refactor(store)!: remove ObjectStore.signed_post - #96

Merged
earakely-scale merged 1 commit into
mainfrom
edgararakelyan/remove-signed-post
Oct 7, 2026
Merged

earakely-scale merged 1 commit into
mainfrom
edgararakelyan/remove-signed-post

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Breaking: removes ObjectStore.signed_post from the base class and from S3ObjectStore, GCSObjectStore and the routing store.

issue_upload_policy is the upload-policy API. It returns a typed UploadPolicy whose HttpPostPolicyGrant names the uploader's path and file fields. Its lifetime is one the store either honours or refuses. signed_post returned boto3's raw {url, fields} dict and behaved differently per store:

Nothing in this repo calls it any more, and neither do the downstream stores we know of.

Migrating:

# before
post = store.signed_post(prefix, expires_in=3600, max_bytes=n)          # {"url", "fields"} or None
# after
policy = store.issue_upload_policy(prefix, max_object_bytes=n, expires_in=3600)
policy.write.url, policy.write.fields, policy.write.path_field, policy.write.file_field

issue_upload_policy raises GrantUnavailableError where signed_post returned None, and NotImplementedError on stores without grants. A caller that only needs one object at a known URL can use issue_write_grant (an HTTPS PUT signed for the object's content type).

S3ObjectStore._post_policy and GCSObjectStore._post_policy now take a required max_bytes, since issue_upload_policy always passes one.

Testing

  • Removed tests: tst/unit/store/s3_signed_post_test.py is deleted. Its upload-policy cases are covered by test_object_transfer_grants.py, which checks the exact generate_presigned_post call for prefixes with and without a trailing slash. Its signed_post-only cases (no size bound, None from stores that can't sign) have no successor.
  • GCS: the signed_post test's bucket-root case is now an issue_upload_policy test.
  • Write fence: the local-run write fence no longer lists signed_post.
  • Suite: tst/unit 6066 passed (13 skipped); protocol 330 passed.
  • Plugin API check: passes.

Labelled bump-version.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge as the intended breaking API change.

Summary

The PR removes signed_post from object stores and routes prefix uploads through the typed issue_upload_policy API. S3 and GCS policies now require a per-object size limit.

  • Prefix uploads use a typed policy with a required size limit.

Reviews (1) · Last reviewed commit: "refactor(store)!: remove ObjectStore.sig..." · Reviewed by Greptile

issue_upload_policy is the upload policy API: typed, with the uploader's path
and file field names, and a lifetime the store either honours or refuses.
signed_post returned boto3's raw {url, fields} and behaved differently per
store (S3 kept the prefix as given until recently; GCS returned None without a
signer and silently clamped the expiry). Nothing calls it now, so it goes:
from the base class, the S3 and GCS stores and the routing store.

S3ObjectStore._post_policy and GCSObjectStore._post_policy take a required
max_bytes, since issue_upload_policy always passes one. S3's upload-policy
coverage is in test_object_transfer_grants; GCS keeps its bucket-root case as an
issue_upload_policy test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner October 7, 2026 14:21
@earakely-scale
earakely-scale merged commit 6baa442 into main Oct 7, 2026
13 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/remove-signed-post branch October 7, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant