Conversation
15 tasks
This branch has not been deployed
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.
Description
Adds a new
sap_cloud_sdk.object_storagepackage that provides a single, provider-agnostic client for object storage across Amazon S3/MinIO, Azure Blob Storage, and Google Cloud Storage.Users call
create_client(instance=...)and get back a client satisfying theObjectStoreClientprotocol. The concrete provider is auto-detected from the service binding, so consuming code stays identical regardless of which cloud backs the instance.Highlights:
ObjectStoreClientprotocol (put_object,put_object_from_bytes,put_object_from_file,get_object,delete_object,list_objects,head_object,object_exists) implemented by all three provider backends.create_client()infers the provider from the binding keys present in the secret mount / env vars. Detection requires a complete provider signature and errors clearly when keys match zero or multiple providers.S3Config,AzureConfig, orGcsConfigdirectly tocreate_client(config=...)to bypass auto-detection.objectstoremodule is now deprecated — its operations are markeddeprecated, constructing the legacy client emits aDeprecationWarningpointing to the new package, and its user guide / README link are updated accordingly. The old module still works for a smooth migration.azure-storage-blob,google-cloud-storage), so all three providers work out of the box.This ports and generalizes the work from #291 into a dedicated multi-provider package.
Related Issue
N/A
Type of Change
Please check the relevant option:
How to Test
uv sync --all-extras --group devuv run pytest tests/object_storage/unit -q— covers detection, factory dispatch, per-provider clients, config resolution, validation, the public API surface, and the legacy deprecation warning.docs/INTEGRATION_TESTS.md:uv run pytest tests/object_storage/integration -v.create_client()returns the correct backend for each provider binding; the legacyobjectstoreclient emits aDeprecationWarning.Checklist
Breaking Changes
None. The new
object_storagepackage is purely additive. The existingobjectstoremodule is deprecated but continues to function;Additional Notes
None