-
Notifications
You must be signed in to change notification settings - Fork 116
Move the copy requests and the multipart copy plan into S3Core, and abort uploads interrupted during creation (step 3.3 of #1063) #1074
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
9 commits
Select commit
Hold shift + click to select a range
9187b6f
Move the copy requests and the multipart copy plan into S3Core
laughingman7743 3a184ae
State which core operations send more than one request, and the missi…
laughingman7743 567b216
Correct which plan fields are empty and split the docs exception into…
laughingman7743 3e6d7c5
Reuse S3Path.with_version_id, operation_params and the shared copy fi…
laughingman7743 2f7a891
Say in the docs that a source whose HeadObject size fits one CopyObje…
laughingman7743 1d84d89
Wrap the copy paragraph of the docs and name mv() among its callers
laughingman7743 748e48b
Abort a multipart copy's upload when an interrupt arrives during its …
laughingman7743 aa90e74
Schedule the aio creation right before its cleanup guard, synchronize…
laughingman7743 733cb48
Interrupt the creation in its test only once it runs, and keep a late…
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.
Independent review (relayed): Claude
claude-fable-5-1(Agent tool, modelfable, general-purpose, read-only instructions) on the same detached snapshot2f7a891c77c088c0afb529c5cf5aca4aeff67e6a, diff6d268b17d984adf2b16acadfd3e8fd447a03a376..2f7a891c77c088c0afb529c5cf5aca4aeff67e6a, with the same prompt. Static review.Coverage (reviewer):
s3_core.py(new plan, operations, private helpers; existing call/operation_params/multipart primitives),s3.pyands3_async.pycopy paths including the unchanged_finish_multipart_upload/_abort_multipart_uploadand the aio cancellation machinery,s3_path.py,s3_object.py, the exports, all changed tests (including a hand recomputation of the expected plan intest_plan_multipart_copy),tests/pyathena/util.py,docs/filesystem.md,docs/api/filesystem.rst, and a repo-wide grep for leftover helper references.Result: CLEAN. Verified: request sequence and parameters vs base;
create_paramsequivalence ofoperation_params("copy_object", ...); the union re-filter in sync yields exactly the per-operation params; precedence matches the replaced helpers; version pinning and the fits-single-request boundary are covered by Stubber tests that fail on stray requests; validation order unchanged; aio cancellation untouched; cache invalidation unchanged; docs consistent.Non-blocking notes:
1d84d895(rewrapped, andmv()is now named withcp_file()andcopy(), verified ats3.py:1453).Metadata({}for none), as the base did.S3MultipartCopyPlan.sizeis informational; neither filesystem reads it.Snapshot and PR worktree unchanged after both reviews (
git statusclean, snapshot HEAD2f7a891c77c088c0afb529c5cf5aca4aeff67e6a).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.
Repair
1d84d89532c3ebe11efb1ea83ece665b547e8050(rewrap and namingmv()). Author check: both self-review perspectives applied to the hunk; the call paths were verified (mv()→_copy_file()ats3.py:1453,s3_async.py:380).just docs lintpassed.Independent follow-up (relayed): Claude
claude-fable-5-1on the same snapshot, reviewing only2f7a891c77c088c0afb529c5cf5aca4aeff67e6a..1d84d89532c3ebe11efb1ea83ece665b547e8050. Result: CLEAN. Only the two intended hunks changed (identical under--ignore-all-spaceapart from the addedmv()), the call paths in sync and aio match, the wording is consistent withdocs/filesystem.md:236 and :285-286, and the lines are within the paragraph's width. Static review.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.
Independent follow-up of the #1076 fix (relayed): Claude
claude-fable-5-1on the same snapshot, full review of1d84d89532c3ebe11efb1ea83ece665b547e8050..748e48be. Static review.Coverage (reviewer): both copy paths,
_finish_multipart_upload/_abort_multipart_upload,shieldsemantics against CPython, typing, every sync test that mocks or stubs the creation (unchanged order under the executor), the new tests (including the xdist main-thread execution and the CI runners), and the docs.Result: FINDINGS (docs only; no code regressions).
aa90e742: the claim is now scoped to the creation and the part copies, plus the completion for anAioS3FileSystemcopy.Semaphore, the same as Codex's finding 2. Repaired as above.After the repairs: lint passed; the offline suite matches master's failure set (691 passed); live copy subset 83 passed; the live #1076 check (a held real CreateMultipartUpload, then SIGINT or cancel) left no uploads; the live 10 MiB multipart copy completed in 2 parts in sync and aio.
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.
Narrow follow-up of
748e48be..aa90e742(relayed): Claudeclaude-fable-5-1, same snapshot. Static review. The aio scheduling move, the sync docstring and the docs scoping are correct. The reviewer traced the test throughsubmit,Future.resultandCondition.wait, and found that no SIGINT or handler leaks in any path it traced.Result: FINDINGS (test only). 1: the same residual race as Codex's finding 1, where the creation is still PENDING when SIGINT is handled. Nit: the handler was installed and the sender started outside the
try.Repaired in
733cb483: astartedevent gates the sender, as described in the Codex reply.thread.start()now runs inside thetry, andjoin()runs only for a thread that has started. After the repairs, lint passed and the offline suite matches master's failure set.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.
Final follow-up of
aa90e742..733cb483(relayed): Claudeclaude-fable-5-1, same snapshot. Static review.Coverage (reviewer): the interrupt timing (the sender fires only when the creation is RUNNING and the copy is inside its
try); the copy cannot finish before the interrupt; the test fails without the fix (DID NOT RAISE after the 30 s hold, and no SIGINT is sent); the handler and thread lifecycle, where a late SIGINT is consumed by the ignoring handler before the restore and only one signal is ever sent; the failure paths inside thetry; the skip guard; the per-instancesubmitwrapper. Result: CLEAN.Review complete for this PR; marking Ready after the offline checks pass on
733cb483.