What's Changed
General
- We wrote down our MSRV, and our policy to update the MSRV: #2728
- The implementation of
std::fmt::Debughides the_unknown_fieldsmap if it is empty. The map is empty most of the time, and it is distracting to see in the debug output for nested messages.
Storage
This is the 0.25.0-preview4 release of the Cloud Storage Rust client. This preview includes breaking changes from 0.25.0-preview3, and we expect more breaking changes before GA.
Breaking Changes
- We removed all_bytes() helper. This used to copy all the bytes into a single buffer. This is dangerous (the download may consume up to 5TiB of RAM, or maybe double this in some cases), and misleading (the data copy was not obvious). We are planning to restore the function with maybe a different signature.
size_hint()is now async.
Updates
- Full downloads verify the checksum (CRC32C) of the received data vs. the checksum reported by the service.
Downloads capture some metadata information about the object, such as its size, generation, and checksums. - A download from the service does not include all the information, but it is often enough to avoid a separate RPC.
read_object()will retry downloads that fail to start due to transient errors. It will also resume downloads that are interrupted after they successfully start.upload_object()will retry uploads that fail due to transient errors.upload_object()will verify the checksum returned by the service against the checksum computed from the data.- If the checksum is known, the application can set them as part of the
upload_object()configuration. In this case the checksum is sent when the upload starts, and the service will verify the checksum before finalizing the upload. - If the data source supports
Seek, the application can make a pass over the data to precompute the data checksums. In this case, the checksum is sent when the upload starts, and the service will verify the checksum before finalizing the upload. upload_object()also supports the same functionality for MD5 hashes. However, these are slow and we do not recommend you use them unless they are known ahead of time.- The futures returned by
upload_object()andread_object()are nowSendand'static, making them easier to use in your own code. Sorry we missed that. - Error messages for admin requests with missing information (such as the target bucket name) are much improved.
- Applications can configure the size threshold that switches from single-shot to resumable uploads.
- impl(storage): make upload buffer size configurable by @coryan in #2718
- impl(storage): better upload for tokio files by @coryan in #2724
- feat(storage): local binding errors for bad requests by @dbolduc in #2763
- fix(storage): return correct errors in uploads by @coryan in #2769
- feat(storage): add method to retrieve object metadata by @suzmue in #2685
- feat(storage): upload idempotency option by @coryan in #2793
Auth
- cleanup(auth)!: update retry loop by @harkamaljot in #2706
New Libraries
- feat(cloud/bigquery/datapolicies/v2): generate library by @coryan in #2737
- feat(configdelivery/v1): generate library by @coryan in #2738
Documentation and User Guide
- docs: clarifications and fixes in retry guide by @pcoet in #2742
- docs(user-guide): improve enum examples by @coryan in #2768
- docs(guide): quickstart for Cloud Storage clients by @coryan in #2729
- docs(storage): tutorial on using a queue by @coryan in #2756
- docs(storage): add rewrite object guide by @dbolduc in #2767
- docs(storage): show how to terminate uploads by @coryan in #2772
- docs(storage): user guide for striped downloads by @coryan in #2770
- docs: user guide for updating a resource by @pcoet in #2784
Full Changelog: v0.8.0...v0.9.0