Skip to content

Conversation

@brianaj
Copy link
Collaborator

@brianaj brianaj commented Dec 8, 2025

  • Did you write/update appropriate tests
  • Release notes updated (if appropriate)
  • Appropriate logging output
  • Issue linked
  • Docs updated (or issue created)
  • New package licenses are added to ThirdPartyNotices.txt (if applicable)

Ships #1403

tspascoal and others added 15 commits July 30, 2025 18:54
…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>
…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
Copilot AI review requested due to automatic review settings December 8, 2025 17:46
Copy link
Contributor

Copilot AI left a 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

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Unit Test Results

  1 files    1 suites   10m 25s ⏱️
968 tests 968 ✅ 0 💤 0 ❌
969 runs  969 ✅ 0 💤 0 ❌

Results for commit 797de18.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
ado2gh 72% 70% 712
Octoshift 83% 73% 1746
bbs2gh 83% 78% 663
gei 81% 72% 574
Summary 81% (7757 / 9624) 73% (1846 / 2527) 3695

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.

3 participants