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 — Logging seems to not support type.googleapis.com/google.cloud.audit.AuditLog. · Issue #3218 · googleapis/google-cloud-python

Logging seems to not support type.googleapis.com/google.cloud.audit.AuditLog. #3218

New issue
Copy link
New issue
Copy link
Closed
Closed
Logging seems to not support type.googleapis.com/google.cloud.audit.AuditLog.#3218
Copy link
Assignees
dhermes
Labels
api: loggingIssues related to the Cloud Logging API.priority: p2Moderately-important priority. Fix may not be included in next release.

Description

@daspecster
daspecster
opened on Mar 28, 2017
Issue body actions

@waprin Logging does not seem to support type.googleapis.com/google.cloud.audit.AuditLog.

 File "test_logging.py", line 9, in <module>
    for entry in client.list_entries():  # API call(s)
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/cloud/iterator.py", line 219, in _items_iter
    for item in page:
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/cloud/iterator.py", line 163, in next
    result = self._item_to_value(self._parent, item)
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/cloud/logging/_gax.py", line 488, in _item_to_entry
    resource = MessageToDict(entry_pb)
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/protobuf/json_format.py", line 133, in MessageToDict
    return printer._MessageToJsonObject(message)
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/protobuf/json_format.py", line 164, in _MessageToJsonObject
    return self._RegularMessageToJsonObject(message, js)
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/protobuf/json_format.py", line 196, in _RegularMessageToJsonObject
    js[name] = self._FieldToJsonObject(field, value)
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/protobuf/json_format.py", line 230, in _FieldToJsonObject
    return self._MessageToJsonObject(value)
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/protobuf/json_format.py", line 162, in _MessageToJsonObject
    return methodcaller(_WKTJSONMETHODS[full_name][0], message)(self)
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/protobuf/json_format.py", line 266, in _AnyMessageToJsonObject
    sub_message = _CreateMessageFromTypeUrl(type_url)
  File "/Users/daspecster/.virtualenvs/test-gcp/lib/python2.7/site-packages/google/protobuf/json_format.py", line 341, in _CreateMessageFromTypeUrl
    'Can not find message descriptor by type_url: {0}.'.format(type_url))
TypeError: Can not find message descriptor by type_url: type.googleapis.com/google.cloud.audit.AuditLog.

These entries are for things like auth logging/auditing. I think this popped up for me because I just checked all logs and not a specific services log. However I would imagine this would a common log type to support?

Activity

  1. daspecster
    added
    api: loggingIssues related to the Cloud Logging API.
    on Mar 28, 2017
  2. daspecster
    assigned
    waprin
    on Mar 28, 2017
  3. dhermes commented on Mar 28, 2017

    @dhermes
    dhermes
    on Mar 28, 2017
    Contributor
    More actions

    @daspecster It's not about what Logging supports, it's about our parsing of Any protobufs. When a type is encountered that isn't in the google.protobuf registry, google.protobuf barfs.

    In other words, this bug is a lot more generic than AuditLog

  4. daspecster commented on Mar 28, 2017

    @daspecster
    daspecster
    on Mar 28, 2017
    ContributorAuthor
    More actions

    @dhermes yeah, I gathered.

    Isn't this a problem for GA though?

    /cc @lukesneeringer

  5. dhermes commented on Mar 28, 2017

    @dhermes
    dhermes
    on Mar 28, 2017
    Contributor
    More actions

    Yes it is a problem for GA

  6. waprin commented on Mar 28, 2017

    @waprin
    waprin
    on Mar 28, 2017
    Contributor
    More actions

    I don't think working with AuditLogs are the most critical thing in general (the are mostly for compliance and we have Cloud Console tooling for them), but agree with @dhermes the general bug seems like a pretty big issue, especially if crash while just reading all the logs.

  7. lukesneeringer commented on Mar 28, 2017

    @lukesneeringer
    lukesneeringer
    on Mar 28, 2017
    Contributor
    More actions

    @dhermes Any thoughts on the correct fix?

  8. dhermes commented on Mar 28, 2017

    @dhermes
    dhermes
    on Mar 28, 2017
    Contributor
    More actions

    The culprit is our usage of the google.protobuf parsers:

    $ git grep -n protobuf -- logging/google/ | grep import
    logging/google/cloud/logging/_gax.py:32:from google.protobuf.json_format import MessageToDict
    logging/google/cloud/logging/_gax.py:33:from google.protobuf.json_format import ParseDict
    logging/google/cloud/logging/entries.py:20:from google.protobuf.json_format import Parse
    logging/google/cloud/logging/logger.py:19:from google.protobuf.json_format import MessageToJson
    
  9. lukesneeringer
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Mar 30, 2017
  10. dhermes commented on Mar 31, 2017

    @dhermes
    dhermes
    on Mar 31, 2017
    Contributor
    More actions

    Closing as duplicate of #2674

  11. dhermes
    closed this as completedon Mar 31, 2017
  12. theacodes
    unassigned
    waprin
    on Sep 28, 2018
  13. JustinBeckwith
    assigned
    dhermes
    on Feb 1, 2021
  14. parthea
    added a commit that references this issue on Oct 21, 2023

    chore: move samples from python-docs-sample (#45)

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

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

api: loggingIssues related to the Cloud Logging API.priority: p2Moderately-important priority. Fix may not be included in next release.

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.