-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Sync with upstream/master (Commit b9b3605)
#4
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
Conversation
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.
Pull Request Overview
This PR synchronizes the codebase with upstream/master commit b9b3605, primarily focusing on refactoring upload functionality and improving code organization. The changes involve extracting common multipart upload logic into a reusable function and removing unused validation code.
- Extracted multipart upload logic into a dedicated
processMultipartUploadfunction - Removed unused
validateObjectfunction from utils - Updated command flag descriptions to clarify default bucket behavior
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| gen3-client/g3cmd/utils.go | Removed unused validateObject function |
| gen3-client/g3cmd/upload.go | Refactored multipart upload logic to use new processMultipartUpload function and updated bucket flag description |
| gen3-client/g3cmd/upload-single.go | Updated bucket flag description for consistency |
| gen3-client/g3cmd/upload-multiple.go | Simplified file path processing logic, updated bucket flag description, and added new command flags |
| gen3-client/g3cmd/gitversion.go | Changed variable declarations from var to const and reset version to "N/A" |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* Add bucket param for multipart upload * Resolve comments * Add bucket param for single file upload * add support for upload-single * Get upload-multiple + multipart working * Fix small files not working with multipart * Fix upload * chore(comment): insignificant commit to force test reruns * Refactor upload-multiple * Use file_name provided in manifest (#125) * Use file_name provided in manifest * Use file_name provided in manifest * Ensure file_name used in url * Ensure bucket passed to GeneratePresignedURL * Fix batch * fix utils * fix utils.go * cleanup+remove validateFilePath --------- Co-authored-by: Alexander VanTol <Avantol13@users.noreply.github.com> Co-authored-by: Brian <brian@bwalsh.com>
b892817 to
3cab9cb
Compare
Overview 🌱
This PR reverts changes to OHSU's forked version of gen3-client in order to fix compilation issues related to the unbound furObjects variable.
This PR will make our master branch identical to that of upstream's (including the updates from uc-cdis/cdis-data-client#123 required to run multipart uploads to non-AWS S3 buckets).
Important
This PR also resolves CALYPR Issue #6 related to the misleading version message being included in the command output
Previous Behavior ❌
Compile errors:
➜ go build -o cdis-data-client # github.com/uc-cdis/gen3-client/gen3-client/g3cmd gen3-client/g3cmd/upload-multiple.go:82:30: undefined: furObjects gen3-client/g3cmd/upload-multiple.go:84:13: undefined: batchFURObjects gen3-client/g3cmd/upload-multiple.go:84:32: undefined: workers gen3-client/g3cmd/upload-multiple.go:85:32: undefined: batchFURObjects gen3-client/g3cmd/upload-multiple.go:87:34: undefined: batchFURObjects gen3-client/g3cmd/upload-multiple.go:87:51: undefined: workers gen3-client/g3cmd/upload-multiple.go:87:60: undefined: respCh gen3-client/g3cmd/upload-multiple.go:87:68: undefined: errCh gen3-client/g3cmd/upload-multiple.go:88:7: undefined: batchFURObjects gen3-client/g3cmd/upload-multiple.go:89:32: undefined: batchFURObjects gen3-client/g3cmd/upload-multiple.go:89:32: too many errorsSync 🌀
Tip
Upstream Commit b9b3605
New Behavior ✅
Successful compilation!
➜ go build -o cdis-data-client ➜ ls cdis-data-client cdis-data-client ➜ ./cdis-data-client Gen3 Client for downloading, uploading and submitting data to data commons. gen3-client version: N/A, commit: N/ATest Steps ✍️
1. Build
gen3-client2. Upload Single File via
gen3-client3. Upload Single File via calypr_admin
Next Steps 🌀