Skip to content

Support object versioning on GCP locations - #2690

Closed
maeldonn wants to merge 7 commits into
development/8.5from
improvement/gpc-versionning
Closed

Support object versioning on GCP locations#2690
maeldonn wants to merge 7 commits into
development/8.5from
improvement/gpc-versionning

Conversation

@maeldonn

Copy link
Copy Markdown
Contributor

Not handled yet

Gap Impact What it would take
S3 has a suspended versioning state, with null version ids. GCS versioning is only on or off A GCP location cannot represent a suspended bucket Decide whether to reject the configuration or emulate the state
Object versioning on the GCS bucket is a hard requirement: without it, the delete issued behind a delete marker destroys the data instead of archiving it Silent data loss Block writes on a non-versioned bucket, instead of only reporting it in the healthcheck
GCS lifecycle rules on noncurrent versions (isLive: false, daysSinceNoncurrentTime, numNewerVersions) can reap generations that S3 still serves as current Deferred and silent data loss, with no error at write time Document the precondition, and consider detecting such rules at configuration time
GCS never promotes a noncurrent generation, so the backend state diverges from the S3 view after an undelete or a version delete Confusing during support, and the root cause of the lifecycle exposure above Optional: promote by copy, accepting the new generation, the non-atomicity and the storage class reset

@maeldonn
maeldonn requested review from a team, DarkIsDude and benzekrimaha August 31, 2026 10:16
@bert-e

bert-e commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Hello maeldonn,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/bypass_source_branch_lineage Bypass the cross-branch contamination check
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Missing Jira issue

It is mandatory to specify a Jira issue in the source branch name
in order to merge into development/8.5. The issue key must follow
the prefix of the branch.

I could not find such an issue in improvement/gpc-versionning.

Comment thread lib/storage/data/external/GCP/GcpService.js
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
maeldonn force-pushed the improvement/gpc-versionning branch from 9d4bffa to c433ebf Compare August 31, 2026 12:11
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.23077% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.15%. Comparing base (0bbe970) to head (c433ebf).

Files with missing lines Patch % Lines
lib/storage/data/MultipleBackendGateway.js 0.00% 2 Missing ⚠️
lib/storage/data/external/GcpClient.js 91.30% 2 Missing ⚠️
lib/storage/data/external/PfsClient.js 0.00% 2 Missing ⚠️
lib/storage/data/external/AzureClient.js 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maeldonn

Copy link
Copy Markdown
Contributor Author

Closed for #2692

@maeldonn maeldonn closed this Aug 31, 2026
@maeldonn
maeldonn deleted the improvement/gpc-versionning branch August 31, 2026 13:45
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.

2 participants