chore: librarian generate pull request: 20260325T203946Z by parthea · Pull Request #1783 · googleapis/python-storage · GitHub
Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

chore: librarian generate pull request: 20260325T203946Z#1783

Closed
parthea wants to merge 2 commits into
mainfrom
librarian-20260325T203946Z
Closed

chore: librarian generate pull request: 20260325T203946Z#1783
parthea wants to merge 2 commits into
mainfrom
librarian-20260325T203946Z

Conversation

@parthea

@parthea parthea commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

PR created by the Librarian CLI to generate Cloud Client Libraries code from protos.

BEGIN_COMMIT

BEGIN_NESTED_COMMIT
feat: Added a new field ComposeObjectRequest.delete_source_objects field

PiperOrigin-RevId: 863087065
Library-IDs: google-cloud-storage
Source-link: googleapis/googleapis@51ff87f4
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
docs: Updated documentation for BidiReadObject, ReadObjectRequest, and ObjectContexts

PiperOrigin-RevId: 863087065
Library-IDs: google-cloud-storage
Source-link: googleapis/googleapis@51ff87f4
END_NESTED_COMMIT

END_COMMIT

This pull request is generated with proto changes between
googleapis/googleapis@5400ccce
(exclusive) and
googleapis/googleapis@51ff87f4
(inclusive).

Librarian Version: v1.0.2-0.20260309131826-42ac5c451239
Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:8e2c32496077054105bd06c54a59d6a6694287bc053588e24debe6da6920ad91

@parthea parthea requested review from a team as code owners March 25, 2026 20:39
@product-auto-label product-auto-label Bot added size: l Pull request size is large. api: storage Issues related to the googleapis/python-storage API. labels Mar 25, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

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

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.

Code Review

This pull request updates the Python environment and testing configurations, including raising the minimum required Python version to 3.10, adding new grpc and testing extra dependencies in setup.py, and refactoring Nox sessions for conformance tests. Specifically, a new conftest_retry_bidi session is introduced, and the existing conftest_retry session is improved. The PR also removes explicit flake8 pinning and the re import, updates internal metadata files, and makes minor documentation adjustments in storage.py for ComposeObjectRequest, ReadRange, and ObjectContexts. Additionally, the mTLS client certificate handling in client.py is refactored to directly validate the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable, with corresponding unit test updates. Review feedback points out an inconsistency in handling the case sensitivity of the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable, an inefficiency in the conftest_retry_bidi Nox session due to repeated pytest invocations, and a duplicate google-cloud-testutils dependency in setup.py's testing extras.

if client_options is None:
client_options = client_options_lib.ClientOptions()
use_client_cert = StorageClient._use_client_cert_effective()
use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")

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.

high

The value of the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not converted to lowercase here. This is inconsistent with the _read_environment_variables method (line 438) and means that values like 'True' or 'TRUE' will raise a ValueError instead of being correctly interpreted. To handle the environment variable case-insensitively and improve robustness, please add .lower().

Suggested change
use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")
use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false").lower()

Comment on lines +280 to +291
bidi_tests = [
"tests/conformance/test_bidi_reads.py",
"tests/conformance/test_bidi_writes.py",
]
for test_file in bidi_tests:
session.run(
"pytest",
"-vv",
"-s",
test_file,
env={"DOCKER_API_VERSION": "1.39"},
)

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.

medium

The conftest_retry_bidi session runs pytest in a loop for each test file. This is inefficient as it incurs pytest startup overhead for each file. You can improve performance by running pytest once with all test files passed as arguments.

    bidi_tests = [
        "tests/conformance/test_bidi_reads.py",
        "tests/conformance/test_bidi_writes.py",
    ]
    session.run(
        "pytest",
        "-vv",
        "-s",
        *bidi_tests,
        env={"DOCKER_API_VERSION": "1.39"},
    )

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.

medium

The dependency google-cloud-testutils is listed twice in the testing extras (here and on line 63). Please remove this duplicate entry to keep the dependencies clean.

@parthea parthea closed this Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storage Issues related to the googleapis/python-storage API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants