-
Notifications
You must be signed in to change notification settings - Fork 124
Brianaj/external pr 1403 #1479
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
base: main
Are you sure you want to change the base?
Brianaj/external pr 1403 #1479
Conversation
…t variable Allows users to set an env variable GITHUB_OWNED_STORAGE_MULTIPART_BYTES with the number of bytes (min 5 Mib) for max number of bytes senter for each part in a multipart upload. By allowing the users to use a smaller size than the default, allows the upload to work in cases a user has a proxy that mishandles or blocks big uploads or for very slow connections. If not defined uses the default 100 Mib value
ArchiveUploader no longer reads the env variable directly. This eliminates the race condition in the tests
Co-authored-by: synthead <synthead@github.com>
…l/gh-gei into override-multipart-size
…s instead of bytes env variable is now called GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES
…s instead of bytes env variable is now called GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES
…l/gh-gei into override-multipart-size
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 adds support for configurable multipart upload chunk size for GitHub-owned storage uploads. The feature allows users to set the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable to customize the upload part size (minimum 5 MiB, default 100 MiB), which can improve upload reliability in environments with proxies or slow network connections.
Key changes:
- Added environment variable handling for configurable multipart upload chunk size with validation
- Introduced comprehensive test coverage for the new configuration options
- Updated documentation in README.md with usage examples for Windows PowerShell and macOS/Linux
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Octoshift/Services/ArchiveUploader.cs | Added environment variable-based configuration for multipart upload chunk size with validation logic (minimum 5 MiB, default 100 MiB) |
| src/Octoshift/Services/EnvironmentVariableProvider.cs | Added new method to retrieve the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable |
| src/Octoshift/Factories/GithubApiFactory.cs | Updated factory methods to pass EnvironmentVariableProvider to ArchiveUploader constructor |
| src/OctoshiftCLI.Tests/Octoshift/Services/ArchiveUploadersTests.cs | Added comprehensive test coverage for environment variable validation (valid values, invalid values, zero, negative, below minimum, at minimum, and large values) |
| src/OctoshiftCLI.Tests/Octoshift/Services/GithubApiTests.cs | Updated test setup to properly instantiate ArchiveUploader with the new required parameter |
| src/OctoshiftCLI.IntegrationTests/GhesToGithub.cs | Updated integration test to instantiate ArchiveUploader with EnvironmentVariableProvider |
| src/OctoshiftCLI.IntegrationTests/BbsToGithub.cs | Updated integration test to instantiate ArchiveUploader with EnvironmentVariableProvider |
| README.md | Added documentation section explaining how to configure multipart upload chunk size with examples for both Windows PowerShell and macOS/Linux |
| RELEASENOTES.md | Added release note describing the new configurable multipart upload feature |
ThirdPartyNotices.txt(if applicable)Ships #1403