Support object versioning on GCP locations - #2690
Closed
maeldonn wants to merge 7 commits into
Closed
Conversation
Contributor
Hello maeldonn,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Missing Jira issueIt is mandatory to specify a Jira issue in the source branch name I could not find such an issue in |
Translate the S3 versionId query parameter into GCP's generation on outgoing requests and expose the x-goog-generation response header as VersionId, so the inherited AWS data client stores and addresses GCS generations as dataStoreVersionId. Delete markers, which have no backend-side version on GCS, are kept metadata-only and skipped on version-targeted deletes; the best-effort delete of the live version treats NoSuchKey as success so delete markers can stack, as S3 semantics require. Add unit tests for GCP generation-based versioning Cover the versionId-to-generation request translation and the x-goog-generation response mapping in GcpService, and the delete-marker and version-targeted delete behavior in AwsClient. Issue: ARSN-627
GcpService expects a config object with the AWS SDK settings nested under an s3Params key, but GcpClient still passed the flat parameter object used by the former SDK v2 service. The SDK then received an undefined config and crashed on the first GCP request with "Cannot read properties of undefined (reading 'forcePathStyle')". Issue: ARSN-627
Thread the source object's dataStoreVersionId down the external-backend copy path (DataWrapper -> MultipleBackendGateway -> external clients) and address the copy source as 'key?versionId=...', so the backend copies the requested version instead of silently copying the latest one while the destination metadata still describes the source version. On GCP, move the versionId suffix of the copy source into the x-goog-copy-source-generation header, since GCS ignores the S3 query parameter on the copy source. Issue: ARSN-627
Tags are stored in and served from the S3 metadata layer. GcpClient inherited the AWS tagging implementation, whose S3 tagging API call is not supported by GCS: tagging a version returned ServiceUnavailable even though the tags were correctly recorded in metadata. Make the GCP data-layer tagging operations succeed without contacting the backend; emulating backend tagging with a metadata-rewriting copy is not an option either, as it would create a new GCS generation and desynchronize the stored dataStoreVersionId. Issue: ARSN-627
…ersion Same defect as the CopyObject path: the source object's dataStoreVersionId was dropped in DataWrapper, so the backend server-side part copy always read the latest version of the source key. Thread it down to the AWS and GCP clients and address the copy source as 'key?versionId=...'; on GCP the existing middleware turns that suffix into the x-goog-copy-source-generation header. Issue: ARSN-627
Above lib-storage's part-size threshold the inherited streaming put issues native S3 multipart requests, which GCS rejected with SignatureDoesNotMatch: the GCP branch of getCanonicalizedResource omitted the uploads subresource, so the V2 signature of the initiation covered a resource without it. Any object larger than ~5MB therefore failed on GCP locations, surfaced as ServiceUnavailable, including CopyObject of such objects, which streams through an internal put. Add uploads to the signed subresources. Measured against GCS, uploadId and partNumber must stay out: signing them makes every part upload fail the same way. Issue: ARSN-627
The SDK's flexible-checksums default computes a CRC32 on every request body. On a stream the checksum is only known once the body is sent, so the SDK switches to aws-chunked encoding with a trailing checksum. GCS does not decode it and stores the framing as object data, corrupting streaming puts below the multipart threshold, where GcpManagedUpload passes the stream straight to putObject. Set requestChecksumCalculation and responseChecksumValidation to WHEN_REQUIRED so streaming bodies are sent raw. Issue: ARSN-627
maeldonn
force-pushed
the
improvement/gpc-versionning
branch
from
August 31, 2026 12:11
9d4bffa to
c433ebf
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## development/8.5 #2690 +/- ##
===================================================
+ Coverage 74.65% 75.15% +0.50%
===================================================
Files 227 227
Lines 18606 18656 +50
Branches 3850 3863 +13
===================================================
+ Hits 13890 14021 +131
+ Misses 4711 4630 -81
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Closed for #2692 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Not handled yet
nullversion ids. GCS versioning is only on or offisLive: false,daysSinceNoncurrentTime,numNewerVersions) can reap generations that S3 still serves as current