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

test(logging): add back DeleteLog test #3114

Merged
merged 3 commits into from
Oct 30, 2020
Merged

test(logging): add back DeleteLog test #3114

merged 3 commits into from
Oct 30, 2020

Conversation

0xSage
Copy link
Contributor

@0xSage 0xSage commented Oct 29, 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.

@0xSage 0xSage requested review from jeanbza and a team October 29, 2020 21:52
@0xSage 0xSage self-assigned this Oct 29, 2020
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 29, 2020
@0xSage 0xSage requested review from codyoss and removed request for jeanbza October 29, 2020 22:06
@0xSage 0xSage added api: logging Issues related to the Cloud Logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: process A process-related concern. May include testing, release, or the like. labels Oct 29, 2020
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with a small nit. Thanks.

defer c.Close()
defer a.Close()
lg := c.Logger(testLogID)
err := lg.LogSync(ctx, logging.Entry{Payload: "hello"})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: combine with if check below if err := lg.LogSync(ctx, logging.Entry{Payload: "hello"}); err != nil { ...}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noted for future , thanks!

@0xSage 0xSage added the automerge Merge the pull request once unit tests and other checks pass. label Oct 30, 2020
@gcf-merge-on-green gcf-merge-on-green bot merged commit b66727a into master Oct 30, 2020
@gcf-merge-on-green gcf-merge-on-green bot deleted the fix1654 branch October 30, 2020 15:38
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 30, 2020
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. cla: yes This human has signed the Contributor License Agreement. priority: p2 Moderately-important priority. Fix may not be included in next release. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logging: fix TestLogsAndDelete
2 participants