-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Logging: sink reload throws exception if the sink has no filter #4696
Copy link
Copy link
Closed
Labels
api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
A KeyError exception for 'filter' is thrown when calling [sink].reload() if there is no filter. The API doesn't return a 'filter' key when retrieving the sink if its null.
Simplified code example
Raw API response for sink request (via gcloud)
Problematic code
/google/cloud/logging/sink.py Line 157
self.filter_ = data['filter']Traceback