Don't enforce project ID validation when unmarshallig log entries#1808
Don't enforce project ID validation when unmarshallig log entries#1808tseaver merged 2 commits intogoogleapis:masterfrom tseaver:1806-logging-relax_project_validation_for_log_entries
Conversation
Pass 'None' as the project argument.
The back-end apparently returns numeric project IDs in some cases. Closes: #1806.
|
The decision to fully disable the check instead of to make it optional was due to the deep nesting of method calls? Could we put a flag on /cc @waprin |
|
@dhermes The deep nesting is part of it: the other part is that the validation was a carryover from other places where having the project match up was essential to allow re-use of the existing client, which isn't the case at all for log entries (there are no API calls which originate from them). If the backend had a "list loggers" API (which it inexplicably doesn't), then we might need to be validating the project when unmarshalling its results. |
|
I guess somebody could call |
|
Sorry for going AWOL. 5 days, eek! LGTM. We can add in more hooks as they come up. |
|
Btw, returning project numbers been acknowledged as a bug but apparently it won't get fixed for a few months since it will be fixed by some stack migration anyway. |
The back-end apparently returns numeric project IDs in some cases.
Update
gcloud._helpers._name_from_project_pathto allow passing itsprojectargument asNoneto disable the validation.Closes: #1806.