impl(storage): serialize `Object` for uploads by coryan · Pull Request #2585 · googleapis/google-cloud-rust · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

impl(storage): serialize Object for uploads #2585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

coryan
Copy link
Collaborator

@coryan coryan commented Jul 3, 2025

When inserting new objects the metadata can be included in the intial
POST request (for resumable uploads), or in the first MIME-multipart
section (for multipart uploads).

Only a subset of the fields may be included in this initial upload, and
some fields require transformations from the gRPC to the JSON data
models.

This change introduces the function to serialize via a
serde_json::Value. We may optimize this further in a future set of
changes.

Part of the work for #2043

When inserting new objects the metadata can be included in the intial
POST request (for resumable uploads), or in the first MIME-multipart
section (for multipart uploads).

Only a subset of the fields may be included in this initial upload, and
some fields require transformations from the gRPC to the JSON data
models.

This change introduces the function to serialize via a
`serde_json::Value`. We may optimize this further in a future set of
changes.
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Jul 3, 2025
Copy link

codecov bot commented Jul 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.35%. Comparing base (1b2bdb3) to head (c106a36).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2585      +/-   ##
==========================================
+ Coverage   95.28%   95.35%   +0.06%     
==========================================
  Files          82       82              
  Lines        3375     3425      +50     
==========================================
+ Hits         3216     3266      +50     
  Misses        159      159              

☔ 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.

Copy link
Member

@dbolduc dbolduc left a comment

Choose a reason for hiding this comment

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

Ack on the PR description for why we cannot just serialize the message with serde

@@ -244,9 +244,114 @@ impl From<Object> for control::model::Object {
}
}

/// Create a JSON object for the [control::model::Object] fields used in uploads.
///
/// When uploading (aka inserting) an object number of metadata fields can be
Copy link
Member

Choose a reason for hiding this comment

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

any number of?

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.

2 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.