Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: fix TestLogsAndDelete #1654

Closed
jeanbza opened this issue Nov 6, 2019 · 1 comment · Fixed by #3114
Closed

logging: fix TestLogsAndDelete #1654

jeanbza opened this issue Nov 6, 2019 · 1 comment · Fixed by #3114
Assignees
Labels
api: logging Issues related to the Cloud Logging API. type: cleanup An internal cleanup or hygiene concern.

Comments

@jeanbza
Copy link
Contributor

jeanbza commented Nov 6, 2019

Too many runs causes us to run out of quota. We've tried and failed to dramatically increase quota (logging team gives a ridiculously low quota of, like, 20 per hour to Delete, and won't budge on it).

We should probably use a project pool.

https://sponge.corp.google.com/target?id=35806e80-802d-4ab2-8c8a-006e70d5b9aa&target=cloud-go-libraries/google-cloud-go/continuous/go111&searchFor=&show=ALL&sortBy=STATUS

=== RUN   TestLogsAndDelete
--- FAIL: TestLogsAndDelete (0.08s)
    logging_test.go:497: deleting "GO-LOGGING-CLIENT/TEST-LOG-20191021-67194905680597-0001": rpc error: code = ResourceExhausted desc = Quota exceeded for quota metric 'logging.googleapis.com/control_requests' and limit 'ControlRequestsPerMinutePerProject' of service 'logging.googleapis.com' for consumer 'project_number:36639933145'.
@jeanbza jeanbza added this to the Tests clean up milestone Nov 6, 2019
@jeanbza jeanbza added the type: cleanup An internal cleanup or hygiene concern. label Nov 6, 2019
gopherbot pushed a commit that referenced this issue Nov 6, 2019
Updates #1654

Change-Id: I73eea0d21ea6a004e8ef448537819eae26dddb34
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/47990
Reviewed-by: Jean de Klerk <deklerk@google.com>
@codyoss codyoss self-assigned this May 12, 2020
@product-auto-label product-auto-label bot added the api: logging Issues related to the Cloud Logging API. label Jul 10, 2020
@codyoss codyoss assigned simonz130 and unassigned codyoss Sep 29, 2020
@freelerobot freelerobot assigned freelerobot and unassigned simonz130 Oct 9, 2020
@freelerobot
Copy link
Contributor

freelerobot commented Oct 28, 2020

Taking a look at this now

Ruled out pool project: tbp@: Project pools would be a bit more work to maintain. So, we've held off in favor of tests not assuming they have full control of the project. That's a bit easier for client library code than samples. Will look at alternative approach where we just delete once instead of all logs.

Ruled out making Logs return less logs: I explored extending Logs() so we can add a filter to it, and thus get less logs to be deleted. But this is not possible atm. #3108

gcf-merge-on-green bot pushed a commit that referenced this issue Oct 30, 2020
fixes #1654 

To de-flake:
- Instead of calling Logs() which is flakey, we write a new log entry then do a single deletion
- Also verified with BE that the quota for all logadmin api calls is 600/min and 1k/hour

It might still flake for a new reason since DeleteLogs is getting deprecated and may be inherently flakey. I will monitor it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants