Skip to content

Project from client (bill-stackdriver-experiment) should agree with project from resource(1054618175867). #1806

@waprin

Description

@waprin

I'm not sure if this is a gcloud-python issue or a bug on the server-side.

Doing list_log.entries() gives the error:

  File "/Users/waprin/.virtualenvs/docsamples10/lib/python2.7/site-packages/gcloud/_helpers.py", line 464, in _name_from_project_path
    'project from resource(%s).' % (project, found_project))
ValueError: Project from client (bill-stackdriver-experiment) should agree with project from resource(1054618175867).

Adding some print statements reveals the reason:

LOGGER NAME IS projects/1054618175867/logs/appengine.googleapis.com%2Frequest_log

It seems some of the app engine logs return the project as the project number rather then the project ID. Note that 1054618175867 is the correct project number for the project. I do feel like there should be consistency and only the project id should be used so maybe this is a server side bug, but I'm not sure if there's any official external docs to reference. Getting the project number from a project id also might mean an extra API call is required just to do a validation.

My vote would be to temporarily disable the validation for now and follow up internally about the format, thoughts?

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the Cloud Logging API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions