{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1806","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1806/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1806/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1806/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/issues/1806","id":155391351,"number":1806,"title":"Project from client (bill-stackdriver-experiment) should agree with project from resource(1054618175867).","user":{"login":"waprin","id":1075173,"avatar_url":"https://avatars.githubusercontent.com/u/1075173?v=3","gravatar_id":"","url":"https://api.github.com/users/waprin","html_url":"https://github.com/waprin","followers_url":"https://api.github.com/users/waprin/followers","following_url":"https://api.github.com/users/waprin/following{/other_user}","gists_url":"https://api.github.com/users/waprin/gists{/gist_id}","starred_url":"https://api.github.com/users/waprin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waprin/subscriptions","organizations_url":"https://api.github.com/users/waprin/orgs","repos_url":"https://api.github.com/users/waprin/repos","events_url":"https://api.github.com/users/waprin/events{/privacy}","received_events_url":"https://api.github.com/users/waprin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-18T00:18:05Z","updated_at":"2016-05-18T00:33:29Z","closed_at":null,"body":"I'm not sure if this is a gcloud-python issue or a bug on the server-side.\r\n\r\nDoing `list_log.entries()` gives the error:\r\n\r\n```\r\n  File \"/Users/waprin/.virtualenvs/docsamples10/lib/python2.7/site-packages/gcloud/_helpers.py\", line 464, in _name_from_project_path\r\n    'project from resource(%s).' % (project, found_project))\r\nValueError: Project from client (bill-stackdriver-experiment) should agree with project from resource(1054618175867).\r\n```\r\n\r\nAdding some print statements reveals the reason:\r\n\r\n`LOGGER NAME IS projects/1054618175867/logs/appengine.googleapis.com%2Frequest_log `\r\n\r\nIt 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. \r\n\r\nMy vote would be to temporarily disable the validation for now and follow up internally about the format, thoughts?"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/comments/219894095","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/issues/1806#issuecomment-219894095","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/1806","id":219894095,"user":{"login":"waprin","id":1075173,"avatar_url":"https://avatars.githubusercontent.com/u/1075173?v=3","gravatar_id":"","url":"https://api.github.com/users/waprin","html_url":"https://github.com/waprin","followers_url":"https://api.github.com/users/waprin/followers","following_url":"https://api.github.com/users/waprin/following{/other_user}","gists_url":"https://api.github.com/users/waprin/gists{/gist_id}","starred_url":"https://api.github.com/users/waprin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waprin/subscriptions","organizations_url":"https://api.github.com/users/waprin/orgs","repos_url":"https://api.github.com/users/waprin/repos","events_url":"https://api.github.com/users/waprin/events{/privacy}","received_events_url":"https://api.github.com/users/waprin/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T00:33:29Z","updated_at":"2016-05-18T00:33:29Z","body":"Ok, I missed the docs earlier: \r\n\r\nhttps://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry\r\n\r\n`Required. The resource name of the log to which this log entry belongs. The format of the name is \"projects/<project-id>/logs/<log-id>\". Examples: \"projects/my-projectid/logs/syslog\", \"projects/1234567890/logs/library.googleapis.com%2Fbook_log\".\r\n`\r\nSo the docs do suggest that project number should be supported. I am not a fan though."}}