Skip to content

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Oct 20, 2025

This is needed to resolve the issue where tests fail for google-apps-chat with the following message:

tests/unit/gapic/chat_v1/test_chat_service.py:23669: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
google/apps/chat_v1/services/chat_service/client.py:1845: in update_message
    request = gc_message.UpdateMessageRequest(request)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/proto/message.py:598: in __init__
    pb_value = marshal.to_proto(pb_type, value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/proto/marshal/marshal.py:228: in to_proto
    pb_value = self.get_rule(proto_type=proto_type).to_proto(value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/proto/marshal/rules/message.py:36: in to_proto
    return self._descriptor(**value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:535: in init
    copy.add(**val)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/containers.py:276: in add
    new_element = self._message_descriptor._concrete_class(**kwargs)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:548: in init
    new_val = field.message_type._concrete_class(**field_value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:535: in init
    copy.add(**val)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/containers.py:276: in add
    new_element = self._message_descriptor._concrete_class(**kwargs)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:535: in init
    copy.add(**val)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/containers.py:276: in add
    new_element = self._message_descriptor._concrete_class(**kwargs)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:548: in init
    new_val = field.message_type._concrete_class(**field_value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:516: in init
    field = _GetFieldByName(message_descriptor, field_name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

message_descriptor = <google.protobuf.descriptor.Descriptor object at 0x7fd5f43f7650>, field_name = 'max_lines'

    def _GetFieldByName(message_descriptor, field_name):
      """Returns a field descriptor by field name.
    
      Args:
        message_descriptor: A Descriptor describing all fields in message.
        field_name: The name of the field to retrieve.
      Returns:
        The field descriptor associated with the field name.
      """
      try:
        return message_descriptor.fields_by_name[field_name]
      except KeyError:
        raise ValueError('Protocol message %s has no "%s" field.' %
>                        (message_descriptor.name, field_name))
E       ValueError: Protocol message TextParagraph has no "max_lines" field.

.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:580: ValueError

See PR googleapis/google-cloud-python#14780 where the build/test failed for google-apps-chat. The test passes with google-apps-card 0.3.0

@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Oct 20, 2025
@parthea parthea marked this pull request as ready for review October 20, 2025 15:10
@parthea parthea requested a review from a team as a code owner October 20, 2025 15:10
@parthea parthea added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 20, 2025
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 20, 2025
@parthea parthea enabled auto-merge (squash) October 20, 2025 15:57
@parthea parthea merged commit bfb87e2 into main Oct 20, 2025
267 of 273 checks passed
@parthea parthea deleted the bump-google-apps-card branch October 20, 2025 16:07
parthea added a commit to googleapis/google-cloud-python that referenced this pull request Oct 20, 2025
1.28.2 is needed to resolve an issue where tests fail for
`google-apps-chat` with the following message:

```
tests/unit/gapic/chat_v1/test_chat_service.py:23669: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
google/apps/chat_v1/services/chat_service/client.py:1845: in update_message
    request = gc_message.UpdateMessageRequest(request)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/proto/message.py:598: in __init__
    pb_value = marshal.to_proto(pb_type, value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/proto/marshal/marshal.py:228: in to_proto
    pb_value = self.get_rule(proto_type=proto_type).to_proto(value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/proto/marshal/rules/message.py:36: in to_proto
    return self._descriptor(**value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:535: in init
    copy.add(**val)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/containers.py:276: in add
    new_element = self._message_descriptor._concrete_class(**kwargs)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:548: in init
    new_val = field.message_type._concrete_class(**field_value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:535: in init
    copy.add(**val)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/containers.py:276: in add
    new_element = self._message_descriptor._concrete_class(**kwargs)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:535: in init
    copy.add(**val)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/containers.py:276: in add
    new_element = self._message_descriptor._concrete_class(**kwargs)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:548: in init
    new_val = field.message_type._concrete_class(**field_value)
.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:516: in init
    field = _GetFieldByName(message_descriptor, field_name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

message_descriptor = <google.protobuf.descriptor.Descriptor object at 0x7fd5f43f7650>, field_name = 'max_lines'

    def _GetFieldByName(message_descriptor, field_name):
      """Returns a field descriptor by field name.
    
      Args:
        message_descriptor: A Descriptor describing all fields in message.
        field_name: The name of the field to retrieve.
      Returns:
        The field descriptor associated with the field name.
      """
      try:
        return message_descriptor.fields_by_name[field_name]
      except KeyError:
        raise ValueError('Protocol message %s has no "%s" field.' %
>                        (message_descriptor.name, field_name))
E       ValueError: Protocol message TextParagraph has no "max_lines" field.

.nox/unit-3-7-protobuf_implementation-python/lib/python3.7/site-packages/google/protobuf/internal/python_message.py:580: ValueError
```

See PR #14780
where the build/test failed for `google-apps-chat`. The test passes with
`google-apps-card` 0.3.0

An issue was fixed in gapic-generator==1.28.2
https://github.com/googleapis/gapic-generator-python/releases/tag/v1.28.2
via googleapis/gapic-generator-python#2464
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants