Skip to content

chore: update librarian to v0.14.1-0.20260522151051-433d9e6211ad#17235

Open
suztomo wants to merge 1 commit into
googleapis:mainfrom
suztomo:chore-update-librarian-2026-05-22
Open

chore: update librarian to v0.14.1-0.20260522151051-433d9e6211ad#17235
suztomo wants to merge 1 commit into
googleapis:mainfrom
suztomo:chore-update-librarian-2026-05-22

Conversation

@suztomo
Copy link
Copy Markdown
Member

@suztomo suztomo commented May 22, 2026

Using Librarian revision 433d9e6211ade41965f4be8b8fe8ca33c1d820ee.

google-cloud-python$ go run github.com/googleapis/librarian/tool/cmd/builddockerimages@latest --language python --version=433d9e6211ade41965f4be8b8fe8ca33c1d820ee
...
google-cloud-python$ docker run -u $(id -u):$(id -g) -v .:/repo -v ~/.cache:/.cache -w /repo docker.io/library/librarian-python:433d9e6211ade41965f4be8b8fe8ca33c1d820ee  generate -v --all
...

@suztomo suztomo requested review from chalmerlowe and parthea May 22, 2026 16:23
@parthea parthea self-assigned this May 22, 2026
@parthea parthea marked this pull request as ready for review May 22, 2026 16:29
@parthea parthea requested review from a team as code owners May 22, 2026 16:29
@parthea parthea requested review from shuoweil and removed request for a team May 22, 2026 16:29
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 bumps the minimum supported Python version to 3.10 across multiple packages and optimizes noxfile.py by batching dependency installations. It also introduces new Iceberg-related types in google-cloud-biglake, removes unused imports in google-cloud-chronicle, and updates regex matching in google-cloud-datacatalog-lineage tests. Feedback highlights that the Python version bump requires project metadata updates and a minor version increase to reflect the breaking change. Additionally, a missing re import was identified in the noxfile.py logic, and a contradiction between the docstring and implementation was noted for the TableIdentifier.namespace field.

Python.

Python >= 3.9, including 3.14
Python >= 3.10, including 3.14
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 minimum supported Python version is being bumped to 3.10. Please ensure that the project metadata in setup.py (or pyproject.toml) and the Trove classifiers are also updated to reflect this change. Additionally, when dropping support for specific Python versions, prefer a minor version bump over a patch version bump; this maintains the ability to provide patches for the previous minor version for users still requiring the older environment. If this change appears in documentation examples, ensure the current stable Python version is used rather than the minimum supported version.

References
  1. When a release introduces breaking changes in environment requirements, such as dropping support for specific Python versions or major dependency versions (e.g., protobuf), prefer a minor version bump over a patch version bump.
  2. When updating Python versions in documentation examples, such as nox commands in CONTRIBUTING.rst, use the current stable release version rather than the minimum supported version to ensure examples are relevant and functional for the majority of developers.

Comment on lines +518 to +520
parsed_deps = {
dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) for dep in prerel_deps
}
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 re module is used here but does not appear to be imported in this file. This will cause a NameError at runtime. Additionally, re.match(...).group(1) will raise an AttributeError if no match is found. Consider handling the case where no match is found, although the current list of dependencies is safe.

Suggested change
parsed_deps = {
dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) for dep in prerel_deps
}
import re
parsed_deps = {
dep: re.match(r"^([a-zA-Z0-9_-]+)", dep).group(1) for dep in prerel_deps
}

Comment on lines +400 to +403
namespace: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=1,
)
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 docstring for TableIdentifier.namespace states it is "always 1 element", but the field is defined as a RepeatedField. While this may be intended for future compatibility with nested namespaces, the contradiction between the implementation and the documentation could be confusing for users.

Copy link
Copy Markdown
Contributor

@parthea parthea left a comment

Choose a reason for hiding this comment

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

LGTM, but holding off on formal approval until tests pass

@suztomo
Copy link
Copy Markdown
Member Author

suztomo commented May 22, 2026

The CI is still running.

This is strange:

cover Expected

@suztomo
Copy link
Copy Markdown
Member Author

suztomo commented May 22, 2026

cover Expected

The "cover" step is waiting for unit steps https://github.com/googleapis/google-cloud-python/actions/runs/26290889161/workflow#L119.

@parthea
Copy link
Copy Markdown
Contributor

parthea commented May 22, 2026

The CI is still running.

This is strange:

cover Expected

This is WAI. The cover job runs sequentially after unit. The cover job itself is very quick because we use the results from the unit job.

cover:
runs-on: ubuntu-latest
needs:
- unit

@suztomo
Copy link
Copy Markdown
Member Author

suztomo commented May 22, 2026

Kokoro Systeem Tests failed: http://sponge/84955894-76bd-4caf-aaa9-c3a83f25ef96 :

Configuring environment for: google-cloud-firestore
------------------------------------------------------------
Activated service account credentials for: [kokoro@precise-truck-742.iam.gserviceaccount.com]
Project 'precise-truck-742' lacks an 'environment' tag. Please create or add a tag with key 'environment' and a value like 'Production', 'Development', 'Test', or 'Staging'. Add an 'environment' tag using `gcloud resource-manager tags bindings create`. See https://cloud.google.com/resource-manager/docs/creating-managing-projects#designate_project_environments_with_tags for details.
Updated property [core/project].
/tmpfs/src/github/google-cloud-python/packages/google-cloud-firestore
nox > Running session system-3.12
nox > Creating virtual environment (virtualenv) using python3.12 in .nox/system-3-12
nox > python -m pip install --pre 'grpcio>=1.75.1'
nox > python -m pip install mock pytest google-cloud-testutils -c /tmpfs/src/github/google-cloud-python/packages/google-cloud-firestore/testing/constraints-3.12.txt
nox > python -m pip install pytest-asyncio==0.21.2 six pyyaml -c /tmpfs/src/github/google-cloud-python/packages/google-cloud-firestore/testing/constraints-3.12.txt
nox > python -m pip install -e . -c /tmpfs/src/github/google-cloud-python/packages/google-cloud-firestore/testing/constraints-3.12.txt
nox > py.test --quiet --junitxml=system_3.12_sponge_log.xml tests/system
........................................................................ [  6%]
........................................................................ [ 13%]
........................................................................ [ 19%]
.................F...................................................... [ 26%]
........................................................................ [ 33%]
........................................................................ [ 39%]
........................................................................ [ 46%]
...............................-.-.-.-.-.-.-.-.-..-..-.-.-.-............ [ 51%]
..--.-..--....................-.......................s........s......-. [ 57%]
-.-.-.-.--.-.-.-.-.........................................-.-.-.-.-.-.- [ 62%]
..-..-.-.-.-..............--.-..--...................................... [ 68%]
........................................................................ [ 75%]
..-.-.-.-.-.-.-.-.-..-..-.-.-.-.......--.-..--....................-..... [ 79%]
..................s........s......-.-.-.-.-.--.-.-.-.-.................. [ 85%]
.......................-.-.-.-.-.-.-..-..-.-.-.-.......--.-..--......... [ 90%]
...............................................................u.u.u.u.u [ 96%]
.u.u.u.u.u.u.u.u.u.u.uu.u.u.u.uu.u.u.u.u.u.u.u.u.u.u.u.u.u.u.u.u.u.uu... [100%]
=================================== FAILURES ===================================
__ test_pipeline_results[search.yaml: search_stage_with_sort_and_add_fields] ___

test_dict = {'assert_proto': {'pipeline': {'stages': [{'args': [{...}], 'name': 'collection'}, {'name': 'search', 'options': {'add...acos', 'search_score': 1.0}]}, 'description': 'search_stage_with_sort_and_add_fields', 'file_name': 'search.yaml', ...}
client = 

    @pytest.mark.parametrize(
        "test_dict",
        [
            t
            for t in yaml_loader()
            if "assert_results" in t
            or "assert_count" in t
            or "assert_results_approximate" in t
            or "assert_end_state" in t
        ],
        ids=id_format,
    )
    def test_pipeline_results(test_dict, client):
        """
        Ensure pipeline returns expected results
        """
        expected_results = _parse_yaml_types(test_dict.get("assert_results", None))
        expected_approximate_results = _parse_yaml_types(
            test_dict.get("assert_results_approximate", None)
        )
        expected_count = test_dict.get("assert_count", None)
        expected_end_state = _parse_yaml_types(test_dict.get("assert_end_state", {}))
        pipeline = parse_pipeline(client, test_dict["pipeline"])
        # check if server responds as expected
        got_results = [snapshot.data() for snapshot in pipeline.stream()]
>       _assert_pipeline_results(
            got_results, expected_results, expected_approximate_results, expected_count
        )

tests/system/test_pipeline_acceptance.py:188: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

got_results = [{'name': 'Eastside Cantina', 'search_score': 2.429002523422241}, {'name': 'El Sol Tacos', 'search_score': 1.6450823545455933}]
expected_results = None
expected_approximate_results = [{'name': 'Eastside Cantina', 'search_score': 1.0}, {'name': 'El Sol Tacos', 'search_score': 1.0}]
expected_count = None

    def _assert_pipeline_results(
        got_results, expected_results, expected_approximate_results, expected_count
    ):
        if expected_results:
            assert got_results == expected_results
        if expected_approximate_results is not None:
            tolerance = 1e-4
            if (
                isinstance(expected_approximate_results, dict)
                and "data" in expected_approximate_results
            ):
                if (
                    "config" in expected_approximate_results
                    and "absolute_tolerance" in expected_approximate_results["config"]
                ):
                    tolerance = expected_approximate_results["config"]["absolute_tolerance"]
                expected_approximate_results = expected_approximate_results["data"]
    
            assert len(got_results) == len(expected_approximate_results), (
                "got unexpected result count"
            )
            for idx in range(len(got_results)):
                expected = expected_approximate_results[idx]
>               assert got_results[idx] == pytest.approx(expected, abs=tolerance)
E               AssertionError: assert {'name': 'Eas...9002523422241} == approx({'name...: 1.0 ± 0.99})
E                 
E                 comparison failed. Mismatched elements: 1 / 2:
E                 Max absolute difference: 1.4290025234222412
E                 Max relative difference: 1.4290025234222412
E                 Index        | Obtained          | Expected  
E                 search_score | 2.429002523422241 | 1.0 ± 0.99

I clicked rebuild.

@parthea
Copy link
Copy Markdown
Contributor

parthea commented May 22, 2026

#17239 should fix unit (3.11). The error happened because we encountered a new DeprecationWarning that we haven't tracked before.

suztomo pushed a commit that referenced this pull request May 22, 2026
This PR is needed to resolve the failing `unit-3.11` presubmit in
#17235 which is
due to a new DeprecationWarning from `opentelemetry-api`. See [build
log](https://github.com/googleapis/google-cloud-python/actions/runs/26299236667/job/77419821319?pr=17235).

This PR filters the deprecation warning in `opentelemetry-api` until a
fix is available. See the linked issue for more information.
@suztomo suztomo force-pushed the chore-update-librarian-2026-05-22 branch from 1b63411 to e170016 Compare May 22, 2026 20:27
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.

2 participants