feat(storage): add move command#838
Open
natalie-o-perret wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
[SC-182796] |
Adds `exo storage move` to move objects within a bucket or across buckets, without downloading them locally. Implements server-side copy + delete, preserving metadata, headers, and ACLs. Large objects (over 5 GiB) use multipart copy. Prefix mode selects all objects sharing a prefix, controlled by a trailing slash on the source or the -r flag. Includes a Go 1.26.4 update to fix stdlib vulnerabilities (GO-2026-5039, GO-2026-5037) that were failing govulncheck.
58840da to
5e9c774
Compare
- Merge storage_move_utils.go into storage_move.go; no other storage command has a _utils.go split. - Inline the confirmPrefixMove wrapper; the call is a single AskQuestion expression. - Handle flag-lookup errors in RunE instead of discarding them with _, matching the pattern used by every other storage command. - Replace return cmd.Usage() in PreRunE with exocmd.CmdExitOnUsageError, matching storage_delete and other commands that exit with a 'invalid arguments' reason on bad arity.
quentinalbertone
approved these changes
Jun 8, 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.
What
Adds
exo storage moveto move objects within a bucket or across buckets, without downloading them locally.How
Server-side copy + delete. Works for single objects and prefixes. Large objects (over 5 GiB) use multipart copy for efficiency.
Metadata, headers, and ACLs are preserved.
Not atomic
If the delete step fails after a successful copy, the object stays in both locations. No automatic rollback. This is documented in the command help.
Flags
-ndry-run mode-fskip confirmation prompt-rrecursive (for prefix moves)-vverbose output (shows copy/delete steps, size, URL)--multipart-concurrencycontrol parallel part uploadsTesting
Unit tests for single object and multipart paths. Abort on part copy failure covered. Parts are verified to be sorted before completion. Metadata preservation is verified on multipart uploads.
Unit tests
Local smoke tests
Validation rejects missing destination key when source is a single object:
Dry-run with prefix (no spurious "no objects exist" message):
Non-dry-run with empty prefix (correctly reports no objects):
Verbose prefix move:
Single-object verbose move:
Note
Includes Go 1.26.4 update to fix stdlib vulnerabilities (govulncheck was failing on earlier Go versions).
Note
GitHub Copilot with Sonnet 4.6 has been used for respectively: