GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Mismatch between WriteLogEntriesRequest' · Issue #1889 · googleapis/google-cloud-python

Mismatch between WriteLogEntriesRequest' #1889

New issue
Copy link
New issue
Copy link
Closed
Closed
Mismatch between WriteLogEntriesRequest'#1889
Copy link
Assignees
tseaver
Labels
api: loggingIssues related to the Cloud Logging API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@tseaver
tseaver
opened on Jun 22, 2016
Issue body actions
No description provided.

Activity

  1. tseaver
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: loggingIssues related to the Cloud Logging API.
    on Jun 22, 2016
  2. tseaver commented on Jun 22, 2016

    @tseaver
    tseaver
    on Jun 22, 2016
    ContributorAuthor
    More actions

    @bjwatson, @tbetbetbe PTAL. This is with gax-google-login-v2 0.7.9.

      File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/gcloud/logging/_gax.py", line 108, in write_entries
        labels, partial_success, options)
      File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/py27/lib/python2.7/site-packages/google/logging/v2/logging_service_v2_api.py", line 281, in write_log_entries
        partial_success=partial_success)
      File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/py27/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 496, in init
        field = _GetFieldByName(message_descriptor, field_name)
      File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/py27/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 560, in _GetFieldByName
        (message_descriptor.name, field_name))
    ValueError: Protocol message WriteLogEntriesRequest has no "partial_success" field.
  3. bjwatson commented on Jun 22, 2016

    @bjwatson
    bjwatson
    on Jun 22, 2016
    More actions

    @tseaver Do you have a recipe for reproducing this? Can I assume it's something like the recipe in #1869?

  4. tseaver commented on Jun 22, 2016

    @tseaver
    tseaver
    on Jun 22, 2016
    ContributorAuthor
    More actions

    @bjwatson I think this would do it.

    $ git clone [email protected]:GoogleCloudPlatform/gcloud
    $ cd gcloud
    $ tox -e system-tests --notest
    $ .tox/system-tests/bin/python

    and then:

    from google.logging.v2.config_service_v2_api import ConfigServiceV2Api
    from google.logging.v2.logging_service_v2_api import LoggingServiceV2Api
    from google.logging.v2.metrics_service_v2_api import MetricsServiceV2Api
    from gcloud.logging._gax import _LoggingAPI
    from gcloud.logging import Client
    
    client = Client()
    client._logging_api = _LoggingAPI(LoggingServiceV2Api())
    logger = client.logger('gcloud-issue-1889')
    logger.log_text('This will explode')
  5. tseaver commented on Jun 22, 2016

    @tseaver
    tseaver
    on Jun 22, 2016
    ContributorAuthor
    More actions

    Maybe one file is generated from an older version of its .proto?

  6. bjwatson commented on Jun 23, 2016

    @bjwatson
    bjwatson
    on Jun 23, 2016
    More actions

    Where is .tox/system-tests/lib/python2.7/site-packages/google/logging/v2/logging_pb2.py coming from? It does not match google/logging/v2/logging_pb2.py in grpc-google-logging-v2-0.7.8 or grpc-google-logging-v2-0.7.10.

    Whatever is causing that seems to be the root cause of this issue.

  7. tseaver commented on Jun 23, 2016

    @tseaver
    tseaver
    on Jun 23, 2016
    ContributorAuthor
    More actions

    @bjwatson From grpc-google-logging-v2-1.0.19::

    $ grep logging_pb2 .tox/py27/lib/python2.7/site-packages/grpc_google_logging_v2-1.0.19.dist-info/RECORD 
    google/logging/v2/logging_pb2.py,sha256=qR-LZLvfOTZI_GHyRJmeR9jzpKbDfjjBYvN_M3R1SIw,24755
    google/logging/v2/logging_pb2.pyc,,
  8. bjwatson commented on Jun 23, 2016

    @bjwatson
    bjwatson
    on Jun 23, 2016
    More actions

    I see. We have a stale logging 1.x release somewhere in the search path. I'll hunt it down and destroy it. :)

  9. bjwatson commented on Jun 23, 2016

    @bjwatson
    bjwatson
    on Jun 23, 2016
    More actions

    @tseaver There were stale versions of grpc-google-logging-v2 on PyPi. I had looked for previous releases of gax-google-logging-v2 and didn't find any, but I should have checked for the grpc version, too.

    Looks like we're on to the next bug, and this issue can be closed:

    brianwatson@brianwatson0:~/src/gapi-dev/gcloud-python$ .tox/system-tests/bin/pythonPython 2.7.11 (default, Apr 12 2016, 12:58:26) 
    [GCC 4.8.4] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from google.logging.v2.config_service_v2_api import ConfigServiceV2Api
    >>> from google.logging.v2.logging_service_v2_api import LoggingServiceV2Api
    >>> from google.logging.v2.metrics_service_v2_api import MetricsServiceV2Api
    >>> from gcloud.logging._gax import _LoggingAPI
    >>> from gcloud.logging import Client
    >>> 
    >>> client = Client()
    >>> client._logging_api = _LoggingAPI(LoggingServiceV2Api())
    >>> logger = client.logger('gcloud-issue-1889')
    >>> logger.log_text('This will explode')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/google/home/brianwatson/src/gapi-dev/gcloud-python/gcloud/logging/logger.py", line 186, in log_text
        client.logging_api.write_entries([entry_resource])
      File "/usr/local/google/home/brianwatson/src/gapi-dev/gcloud-python/gcloud/logging/_gax.py", line 107, in write_entries
        labels, partial_success, options)
      File "/usr/local/google/home/brianwatson/src/gapi-dev/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/google/logging/v2/logging_service_v2_api.py", line 282, in write_log_entries
        self._write_log_entries(request, options)
      File "/usr/local/google/home/brianwatson/src/gapi-dev/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/google/gax/api_callable.py", line 474, in inner
        return api_caller(api_call, this_settings, request)
      File "/usr/local/google/home/brianwatson/src/gapi-dev/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/google/gax/api_callable.py", line 462, in base_caller
        return api_call(*args)
      File "/usr/local/google/home/brianwatson/src/gapi-dev/gcloud-python/.tox/system-tests/lib/python2.7/site-packages/google/gax/api_callable.py", line 427, in inner
        sys.exc_info()[2])
    google.gax.errors.GaxError: GaxError(RPC failed, caused by NetworkError(code=StatusCode.INVALID_ARGUMENT, details="A log name must be specified for each log entry"))
    
  10. tseaver commented on Jun 23, 2016

    @tseaver
    tseaver
    on Jun 23, 2016
    ContributorAuthor
    More actions

    I have just pushed a fix for that error on #1892.

  11. tseaver
    closed this as completedon Jun 23, 2016
  12. tseaver commented on Jun 23, 2016

    @tseaver
    tseaver
    on Jun 23, 2016
    ContributorAuthor
    More actions

    After setting up with this gist, Logger.log_text() works when the client is configured with a GAX adapter.

  13. bjwatson commented on Jun 23, 2016

    @bjwatson
    bjwatson
    on Jun 23, 2016
    More actions

    Awesome!

  14. JustinBeckwith
    assigned
    tseaver
    on Feb 1, 2021
  15. vchudnov-g
    added a commit that references this issue on Sep 20, 2023

    Fix typos in dialogflow cloud client comments [(#1889)](GoogleCloudPl…

    60b40f7
  16. parthea
    added a commit that references this issue on Mar 6, 2026

    feat: adds billing to opentel (#1889)

    3390591
  17. parthea
    added a commit that references this issue on Apr 1, 2026

    refactor: add compile_window to the sqlglot compiler (#1889)

    7ae507d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: loggingIssues related to the Cloud Logging API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.