Skip to content

Implement skipIfExists for downloadBlobs in TransferManager#3505

Draft
nidhiii-27 wants to merge 2 commits intomainfrom
implement-skip-if-exists-download-6849503870578500544
Draft

Implement skipIfExists for downloadBlobs in TransferManager#3505
nidhiii-27 wants to merge 2 commits intomainfrom
implement-skip-if-exists-download-6849503870578500544

Conversation

@nidhiii-27
Copy link
Contributor

This PR implements the skipIfExists option for parallel downloads in TransferManager.

When skipIfExists is set to true in ParallelDownloadConfig, TransferManager.downloadBlobs will check if the destination file already exists on the local filesystem. If it does, the download for that blob will be skipped, and the result will have a status of SKIPPED.

Changes:

  1. ParallelDownloadConfig.java: Added skipIfExists boolean and updated the Builder.
  2. TransferManagerImpl.java: Added logic in downloadBlobs to perform the existence check and skip downloads.
  3. DirectDownloadCallable.java: Added a safety check for skipIfExists before starting the download.
  4. ParallelDownloadConfigTest.java: New unit tests for the configuration object.
  5. TransferManagerTest.java: Added unit tests for the skip logic using Mockito.
  6. ITTransferManagerTest.java: Added an integration test case to verify the skip behavior.

Unit tests passed successfully. Integration tests were added but verified manually due to environment-specific credential requirements.


PR created automatically by Jules for task 6849503870578500544 started by @nidhiii-27

- Added skipIfExists field and builder method to ParallelDownloadConfig.
- Implemented skip logic in TransferManagerImpl.downloadBlobs to check for local file existence.
- Added skip logic in DirectDownloadCallable for safety.
- Added unit tests in ParallelDownloadConfigTest and TransferManagerTest.
- Added integration test in ITTransferManagerTest.

Co-authored-by: nidhiii-27 <224584462+nidhiii-27@users.noreply.github.com>
@nidhiii-27 nidhiii-27 requested a review from a team as a code owner February 25, 2026 10:38
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. labels Feb 25, 2026
@nidhiii-27 nidhiii-27 marked this pull request as draft February 25, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/java-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants