Skip to content

GCP Storage Bucket binding: Bulk file transfer#3811

Merged
yaron2 merged 11 commits into
dapr:mainfrom
nelson-parente:feat/gcp-bulk-file-transfer
May 22, 2025
Merged

GCP Storage Bucket binding: Bulk file transfer#3811
yaron2 merged 11 commits into
dapr:mainfrom
nelson-parente:feat/gcp-bulk-file-transfer

Conversation

@nelson-parente

Copy link
Copy Markdown
Contributor

Description

This PR adds bulk get with parallel file downloads.

docs PR: TODO

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #3655

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

Signed-off-by: nelson.parente <[email protected]>
@nelson-parente nelson-parente changed the title feat: bulk get files GCP Storage Bucket binding: Bulk file transfer #3655 May 5, 2025
@nelson-parente nelson-parente changed the title GCP Storage Bucket binding: Bulk file transfer #3655 GCP Storage Bucket binding: Bulk file transfer May 5, 2025
Comment thread bindings/gcp/bucket/bucket.go Outdated
Comment thread bindings/gcp/bucket/bucket.go Outdated
Comment thread bindings/gcp/bucket/bucket.go Outdated
@nelson-parente
nelson-parente marked this pull request as ready for review May 8, 2025 10:28
@nelson-parente
nelson-parente requested review from a team as code owners May 8, 2025 10:28
Signed-off-by: nelson.parente <[email protected]>
@nelson-parente
nelson-parente force-pushed the feat/gcp-bulk-file-transfer branch from cc80115 to b3d2ad1 Compare May 9, 2025 10:50
@yaron2

yaron2 commented May 16, 2025

Copy link
Copy Markdown
Member

@nelson-parente linter is failing

Comment on lines +491 to +497
close(errCh)

for err := range errCh {
if err != nil {
return nil, err
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All errors should be collected. Not return just one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed! please check if its okay with multierr

Comment thread bindings/gcp/bucket/bucket.go Outdated
Comment on lines +483 to +486
if err := os.WriteFile(destPath, data, 0o644); err != nil {
errCh <- err
return
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This data should be returned, no written to a file, no? How is the data useful if written to the daprd filesystem.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got a bit confused with the ask in the issue.. As @JoshVanL points out this would write the files to daprd filesystem and not the app filesystem.

Refactored to return all objects data PTAL

Signed-off-by: nelson.parente <[email protected]>
Signed-off-by: nelson.parente <[email protected]>
Signed-off-by: nelson.parente <[email protected]>
@nelson-parente
nelson-parente force-pushed the feat/gcp-bulk-file-transfer branch from ed46fd4 to 9a4773b Compare May 22, 2025 13:39
@yaron2
yaron2 merged commit 026f997 into dapr:main May 22, 2025
passuied pushed a commit to passuied/components-contrib that referenced this pull request Feb 14, 2026
Signed-off-by: nelson.parente <[email protected]>
Co-authored-by: Yaron Schneider <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GCP Storage Bucket binding: Bulk file transfer

4 participants