Skip to content

feat(storage): Add support for adding blob object in AAOW#16577

Draft
nidhiii-27 wants to merge 1 commit intomainfrom
obj-metadata-in-aaow
Draft

feat(storage): Add support for adding blob object in AAOW#16577
nidhiii-27 wants to merge 1 commit intomainfrom
obj-metadata-in-aaow

Conversation

@nidhiii-27
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@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 updates the asynchronous appendable object writer to support Blob metadata, allowing content_type and metadata to be set during object creation. The AsyncAppendableObjectWriter and _AsyncWriteObjectStream classes now accept an optional Blob object, and a new test snippet has been added to demonstrate this functionality. Feedback was provided regarding the indentation of the resource_params dictionary in async_write_object_stream.py.

Comment on lines +123 to +126
resource_params = {
"name": self.object_name,
"bucket": self._full_bucket_name,
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

The indentation of the resource_params dictionary is incorrect and will cause a SyntaxError. The keys and values should be indented inside the dictionary definition. Additionally, ensure that the dictionary is programmatically sorted to align with repository standards for dictionary key ordering.

            resource_params = dict(
                sorted(
                    {
                        "name": self.object_name,
                        "bucket": self._full_bucket_name,
                    }.items()
                )
            )
References
  1. Python code must follow PEP-8 indentation standards to avoid SyntaxErrors. (link)
  2. To ensure dictionary keys remain sorted without manual effort, programmatically sort the dictionary instead of relying on manual ordering in the code.

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.

1 participant