Repository navigation
Move tagging, ACL, metadata and presign requests into S3Core #1090
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a22fdb9
Move tagging, ACL, metadata and presign requests into S3Core
laughingman7743 2950570
Tighten the new S3Core tagging, ACL and metadata contracts
laughingman7743 eefc13c
Send replaced object metadata as a dict
laughingman7743 76e8912
Document the tagging, ACL, metadata and presign contracts of S3Core
laughingman7743 5c233f8
Name the method that signs request_kwargs in the presign docs
laughingman7743 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review round 2 (claims, callers, operations): base 855d4a7, head c3a4e4f.
Claims checked:
test_put_tags_mergeandtest_put_tags_invalid_modealso pass on master 855d4a7, unmodified, and the existing Stubber tests forsetxattr, the mock tests forchmod, and theurl()request test pass unchanged.m: dict order is preserved, and the merge yields the same TagSet asexisting.update(tags).generate_presigned_urlsends none (it is local and listed as an exception). Each new operation otherwise sends one request.git grepfinds no other users in the repository or docs.S3MetadataSTANDARD note: matchestest_setxattr_omits_unset_system_metadataon master.Existing callers:
get_tags/put_tags/chmod/setxattr/signare unchanged.S3FileSystem._callno longer intercepts these requests, which now go throughcore.call. This is the same trade-off as the earlier Separate an S3 core from the fsspec adapter in pyathena.filesystem #1053 steps, and_callstays a delegate.AWS operator: the same retry layer (
S3Core.call) and the same request count.Documentation reader:
docs/filesystem.mdlists the new request kinds. The setxattr note is still accurate.Evidence limits: static plus offline Stubber/mock evidence only. The live AWS tests (
test_sign,test_metadata_getxattr_setxattr,test_get_and_put_tags,test_chmod_validation, and the aio equivalents) have not run on this head; they run when the PR is marked Ready.just docs buildbuilds committed refs and was not used as evidence.Result: CLEAN (no corrections needed beyond round one's repairs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs follow-up (09e4bce and 3b445a1,
docs/filesystem.mdonly)At the maintainer's request, the "Typed S3 operations" section now states the contracts of the new operations:
put_object_tagging()replaces all tags. Tagging and object ACLs act on the version ID of the path, includingnull.S3Core.OBJECT_ACLSandS3Core.BUCKET_ACLS; another value raisesValueError.replace_object_metadata()takes thehead_object()result of the same path. It rewrites the object, or creates a new version in a versioned bucket. The section lists the retained fields, says that parameters take precedence over them, and says that any encryption parameter replaces the retained encryption.generate_presigned_url()signs locally, and its parameters take precedence overBucket/Key/VersionId.request_kwargssuch asRequestPayerare not signed unless they are passed as parameters.The section also has two small examples.
Self-check:
s3_core.py.RequestPayerappears in the signed URL.just docs lint: 0 errors.Independent follow-up:
962ed09e..09e4bceb: Codex (codex exec -s read-only) CLEAN, static review. claude-fable-5-1 (profilemax, efforthigh, plan mode) CLEAN, static review, with one optional note: "pass them to the call" could be read asS3Core.call().generate_presigned_url()"). On09e4bceb..3b445a18, Codex and Fable were both CLEAN.The live AWS run by the coordinator at 962ed09 passed:
pytest -n 8 tests/pyathena/filesystem/ tests/pyathena/s3fs/ tests/pyathena/aio/s3fs/→ 1156 passed, 1 skipped. The later commits change only the docs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase onto master
5a0a5cb2e4894e1bb49edfc9bd587859dc97bf1d(after #1084 and #1091):3b445a1841cd872069caa3c71bc6a484bd672212→5c233f8e04c8ba08328ee87aa2454d7fcfd88d20, force-pushed with an explicit lease.855d4a7b..3b445a18vs5a0a5cb2..5c233f8e): the five commits are unchanged except for the conflict in the intro paragraph ofdocs/filesystem.md.generate_presigned_url()sentence.cat_file,touch,pipe_fileand theS3FileGET/PUT paths. This PR does not touch those, andplan_multipart_copy()still reads tags throughget_object_tagging().mv()pairing. It does not use tags, ACLs,setxattrorsign.S3FileSystem.OBJECT_ACLS/BUCKET_ACLSreferences remain inpyathena/,tests/ordocs/.5c233f8e:just lintandjust docs lintpass.pytest --noconftest -n 8 tests/pyathena/filesystem/gives 927 passed, 164 failed and 9 skipped, against master5a0a5cb2with 899 passed, 164 failed and 9 skipped. The failing tests are identical on both and need AWS.get_bucket_versioningrequest and a call to the privateS3Core._is_directory_bucket()in the adapter's_move_pairs(s3.py:1464). The final Finish the public S3Core API extraction from filesystem adapters #1086 SDK-call audit will cover them.