Skip to content

feat(storage): add builder and writer skeleton for open appendable object#5699

Draft
vsharonlynn wants to merge 1 commit into
googleapis:mainfrom
vsharonlynn:feat/storage-appendable-upload
Draft

feat(storage): add builder and writer skeleton for open appendable object#5699
vsharonlynn wants to merge 1 commit into
googleapis:mainfrom
vsharonlynn:feat/storage-appendable-upload

Conversation

@vsharonlynn
Copy link
Copy Markdown
Contributor

This follows PR #5697.

@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label May 20, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a skeleton implementation for appendable object uploads, including the OpenAppendableObject request builder and the AppendableObjectWriter utility. Feedback focuses on the structural requirement for the writer to hold a reference to the storage transport layer (the stub) to facilitate bidirectional streaming. Additionally, the reviewer noted that the use of #[allow(dead_code)] without a corresponding TODO or rationale violates the repository's style guide regarding temporary lint suppressions.

Comment on lines +69 to +76
Ok(AppendableObjectWriter {
bucket: resource.bucket,
object: resource.name,
params: self.request.params,
if_metageneration_match: self.request.spec.if_metageneration_match,
if_metageneration_not_match: self.request.spec.if_metageneration_not_match,
options: self.options,
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The AppendableObjectWriter is intended to handle bidirectional streaming RPCs, but it is currently instantiated without the storage stub (self.stub). To perform I/O operations, the writer will need access to the transport layer. Consider passing the stub to the writer and making the writer generic over the storage implementation S to maintain consistency with other writers in the SDK (like WriteObject).

Comment on lines +24 to +33
#[cfg(google_cloud_unstable_storage_bidi)]
#[derive(Debug)]
pub struct AppendableObjectWriter {
pub(crate) bucket: String,
pub(crate) object: String,
pub(crate) params: Option<crate::model::CommonObjectRequestParams>,
pub(crate) if_metageneration_match: Option<i64>,
pub(crate) if_metageneration_not_match: Option<i64>,
pub(crate) options: RequestOptions,
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The AppendableObjectWriter struct lacks a field for the storage stub and is not generic over the storage implementation S. Since this writer is responsible for the bidirectional streaming RPC, it needs a reference to the transport layer (the stub) to function correctly.

Comment thread src/storage/src/storage/append_object/builder.rs
Comment thread src/storage/src/storage/append_object/writer.rs
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 68.33333% with 95 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.75%. Comparing base (6e7650c) to head (b1eba40).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/storage/src/storage/append_object/builder.rs 73.47% 74 Missing ⚠️
src/storage/src/storage/append_object/writer.rs 0.00% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5699      +/-   ##
==========================================
- Coverage   97.91%   97.75%   -0.16%     
==========================================
  Files         226      228       +2     
  Lines       55347    55647     +300     
==========================================
+ Hits        54191    54398     +207     
- Misses       1156     1249      +93     

☔ View full report in Codecov by Sentry.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant