GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: refactorings for CreateMultipartUpload by BenWhitehead · Pull Request #3364 · googleapis/java-storage

This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Conversation

@BenWhitehead

@BenWhitehead BenWhitehead commented Oct 23, 2025

Copy link
Copy Markdown
Collaborator
  1. Define Codec<OffsetDateTime, String> to encapsulate the logic and use of date time formatter
    • Use existing RFC3339 formatter as it's already used by json and tested to be valid
    • update tests to assert equality of OffsetDateTime instances instead of strings -- this ensures that equivalent times but different strings are valid
  2. Refactor the boostrapping of MultipartUploadHttpRequestManager to be a factory method that only needs HttpStorageOptions
    • This removes the need for tests and implementation to perform manual bootstrapping multiple times unnecessarily
    • It also removes the boostrapping logic from MultipartUploadClientImpl and in turn removes the need for HttpStorageOptions to be passed around to multiple places
  3. pre-compute and have a single stable location for all headers which apply to all requests -- x-goog-api-client, x-goog-user-project, user-agent, etc
    • This makes it so fewer things need to know about and interact with HttpStorageOptions, thereby simplifying multiple methods
    • The logic and resolution happens once per client instance removing the need for redundant string concatenations, or environment probes
    • leverages existing abstractions for representing headers, and plumbs user provided headers from HttpStorageOptions
  4. Add logic to compute x-goog-api-client header to match what apiary does
  5. Update request header processing to avoid allocating a temporary map, instead add directly to the requests headers.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ShreyasSinha and others added 17 commits October 20, 2025 08:00
@ShreyasSinha
chore: Refactor retrier creation from HttpStorageOptions to StorageOp…
cbad1ca
…tions
@ShreyasSinha
chore: Refactor retrier creation from HttpStorageOptions to StorageOp…
d6f4cc9
…tions
@ShreyasSinha
feat: Added API for CreateMultipartUpload.
bdbb55f
@ShreyasSinha
chore: Merge branch 'mpu-feature-1' into mpu-feature-2
a1f6efa
@ShreyasSinha
added missing javadoc
3bfd51b
@ShreyasSinha
Fixed lint issues
1157004
@ShreyasSinha
chore: adding review changes.
585707d
@ShreyasSinha
chore: addind review comment fixes
eca5d54
@ShreyasSinha
chore: added test cases
04ff3d5
@ShreyasSinha
chore: fixed IT tests
f4e30f9
@ShreyasSinha
removing mockito conifg no longer required
86a9ab9
@ShreyasSinha
chore: added missing library
1863d02
@ShreyasSinha
fixing licence number
81648dc
@ShreyasSinha
fixing lint error
2a5d1a0
@ShreyasSinha
chore: adding fixes for review comments
744db03
@ShreyasSinha
chore: Adding fixes for IT.
e565af6
@BenWhitehead
chore: refactorings for CreateMultipartUpload
32199bf
1. Define Codec<OffsetDateTime, String> to encapsulate the logic and use of date time formatter
   * Use existing RFC3339 formatter as it's already used by json and tested to be valid
   * update tests to assert equality of OffsetDateTime instances instead of strings -- this ensures that equivalent times but different strings are valid
2. Refactor the boostrapping of MultipartUploadHttpRequestManager to be a factory method that only needs HttpStorageOptions
   * This removes the need for tests and implementation to perform manual bootstrapping multiple times unnecessarily
   * It also removes the boostrapping logic from MultipartUploadClientImpl and in turn removes the need for HttpStorageOptions to be passed around to multiple places
3. pre-compute and have a single stable location for all headers which apply to all requests -- x-goog-api-client, x-goog-user-project, user-agent, etc
   * This makes it so fewer things need to know about and interact with HttpStorageOptions, thereby simplifying multiple methods
   * The logic and resolution happens once per client instance removing the need for redundant string concatenations, or environment probes
   * leverages existing abstractions for representing headers, and plumbs user provided headers from HttpStorageOptions
4. Add logic to compute x-goog-api-client header to match what apiary does
5. Update request header processing to avoid allocating a temporary map, instead add directly to the requests headers.
@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 Oct 23, 2025
@BenWhitehead BenWhitehead mentioned this pull request Oct 30, 2025
chore: mpu preview merge train #3378
Merged
10 tasks done
Base automatically changed from mpu-feature-2 to staged-mpu-merge-train November 3, 2025 21:11
@BenWhitehead

BenWhitehead commented Nov 3, 2025

Copy link
Copy Markdown
Collaborator Author

merged as part of #3356

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BenWhitehead BenWhitehead closed this Nov 3, 2025
BenWhitehead added a commit that referenced this pull request Nov 3, 2025
@ShreyasSinha @BenWhitehead
chore: mpu client preview merge train
479ffee
BEGIN_NESTED_COMMIT

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#createMultipartUpload #3356
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#listParts #3359
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#abortMultipartUpload #3361
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#uploadPart #3375
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#completeMultipartUpload #3372
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadSettings
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
END_COMMIT_OVERRIDE

END_NESTED_COMMIT

Other changes:
1. chore: refactor retrier creation from HttpStorageOptions to StorageOptions #3350
2. chore: refactorings for CreateMultipartUpload #3364
3. chore: fix xml parsing of StringEnumValue's so that the enum contract is not broken #3377
4. chore: add PredefinedAcl#xmlEntry

Co-authored-by: BenWhitehead <[email protected]>
@BenWhitehead
BenWhitehead deleted the mpu-feature-2-ben-modifications branch November 3, 2025 23:02
BenWhitehead added a commit that referenced this pull request Nov 3, 2025
@ShreyasSinha @BenWhitehead
chore: mpu client preview merge train
7ad9fa4
BEGIN_NESTED_COMMIT

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#createMultipartUpload #3356
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#listParts #3359
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#abortMultipartUpload #3361
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#uploadPart #3375
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#completeMultipartUpload #3372
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadSettings
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
END_COMMIT_OVERRIDE

END_NESTED_COMMIT

Other changes:
1. chore: refactor retrier creation from HttpStorageOptions to StorageOptions #3350
2. chore: refactorings for CreateMultipartUpload #3364
3. chore: fix xml parsing of StringEnumValue's so that the enum contract is not broken #3377
4. chore: add PredefinedAcl#xmlEntry

Co-authored-by: BenWhitehead <[email protected]>
BenWhitehead added a commit that referenced this pull request Nov 3, 2025
@ShreyasSinha @BenWhitehead
chore: mpu client preview merge train
160fa9a
BEGIN_NESTED_COMMIT

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#createMultipartUpload #3356
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#listParts #3359
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#abortMultipartUpload #3361
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#uploadPart #3375
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadClient#completeMultipartUpload #3372
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
feat: add preview MultipartUploadSettings
END_COMMIT_OVERRIDE

BEGIN_COMMIT_OVERRIDE
END_COMMIT_OVERRIDE

END_NESTED_COMMIT

Other changes:
1. chore: refactor retrier creation from HttpStorageOptions to StorageOptions #3350
2. chore: refactorings for CreateMultipartUpload #3364
3. chore: fix xml parsing of StringEnumValue's so that the enum contract is not broken #3377
4. chore: add PredefinedAcl#xmlEntry

Co-authored-by: BenWhitehead <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@BenWhitehead @ShreyasSinha
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.