Skip to content

UploadStream for Azure Client#27

Merged
johha merged 2 commits intocloudfoundry:mainfrom
sap-contributions:feature/azurebs-chunking-upload
Jan 29, 2026
Merged

UploadStream for Azure Client#27
johha merged 2 commits intocloudfoundry:mainfrom
sap-contributions:feature/azurebs-chunking-upload

Conversation

@serdarozerr
Copy link
Contributor

Context

Large file uploads require a different strategy than small, single-shot uploads. To stay compatible with existing behavior, the chunking and concurrency model should follow the same conventions used in the Fog Azure implementation.

Solution

This PR introduces an UploadStream function that uploads files in chunks of 4MB using 5 goroutines. The function is triggered when the file size exceeds 32MB.

These values are aligned with the Fog Azure implementation and are based on the constants defined in:
https://github.com/fog/fog-azure-rm/blob/68ea3f7dd14c0a524146f1e426fa2ad1f6192cc8/lib/fog/azurerm/constants.rb

- UploadStream function upload by chunking of size 4MB and with 5 go routines
- This function is used when file size is bigger then 32MB
- These magic numbers are based on fog/azurebs library, check in this link  https://github.com/fog/fog-azure-rm/blob/68ea3f7dd14c0a524146f1e426fa2ad1f6192cc8/lib/fog/azurerm/constants.rb
@github-project-automation github-project-automation bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Jan 29, 2026
@johha johha merged commit 6c07beb into cloudfoundry:main Jan 29, 2026
3 of 4 checks passed
@github-project-automation github-project-automation bot moved this from Pending Merge | Prioritized to Done in Foundational Infrastructure Working Group Jan 29, 2026
return nil, nil, fmt.Errorf("invalid time: %w", err)
}
if err != nil {
slog.Info("Invalid timeout format, need seconds as number e.g. 30s", "timeout", dsc.storageConfig.Timeout)
Copy link
Contributor

Choose a reason for hiding this comment

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

30s or 30?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants