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

spanner: code samples for backups #1296

Conversation

prunge-helix
Copy link
Contributor

Samples and tests for the new Cloud Spanner backups functionality.

Original PRs:
helix-collective/golang-samples#1
helix-collective/golang-samples#2

prunge-helix and others added 30 commits December 3, 2019 10:02
…mples-with-restore

# Conflicts:
#	spanner/spanner_snippets/snippet_test.go
@prunge-helix
Copy link
Contributor Author

@googlebot I consent.

Copy link
Contributor

@skuruppu skuruppu left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes @hengfengli and @ashvds

@skuruppu
Copy link
Contributor

Is there any way we can speed up the tests? It takes ~35 minutes to run all of the tests in the repo right now (funny enough, Spanner tests are one of the slower ones). So, I'd prefer not to add another 8+ minutes. Some tests for other APIs "fire and forget/cancel."

Yeah we have the same issue in the other language repos as well :( CreateBackup and RestoreBackup take the longest time. To clean up the backups/databases created during the test, we had some code to wait for the DB to be optimized, but seems like that is no longer a requirement.

I think the minimum requirements for the samples are to show how to create a backup and restore from it. We can fire and forget but that means we won't be able to cleanup some of the resources created during the tests, the Go samples won't be showing users how to wait for a long-running operation to complete and they will be inconsistent with those for other languages.

@tbpg would this be a major issue to add ~15 mins? I realize that's quite a bit of time but I'm not sure how to get around it given that it takes so long to do the backup operations :(

@tbpg
Copy link
Contributor

tbpg commented Mar 26, 2020

I think if we make the change for Go, we should do it across all of the languages.

I talked with @hengfengli offline -- we're going to change the test to be E2E and increase the timeout. Then as part of the style guide update, which we should file an issue for, we can look into how we can speed up the tests.

Would it help speed up the tests if we added more nodes?

@skuruppu
Copy link
Contributor

I think if we make the change for Go, we should do it across all of the languages.

I'm happy to consider that. But it will have to be after the launch though since it's a bit fiddly to change all the samples now.

I talked with @hengfengli offline -- we're going to change the test to be E2E and increase the timeout. Then as part of the style guide update, which we should file an issue for, we can look into how we can speed up the tests.

I filed #1315.

Would it help speed up the tests if we added more nodes?

Unfortunately, it won't help :(

@hengfengli hengfengli added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@hengfengli hengfengli added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@hengfengli hengfengli added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@hengfengli
Copy link
Contributor

Kokoro CI doesn't pass due to flaky storage tests:

googleapi: Error 429: The project exceeded the rate limit for creating and deleting buckets., rateLimitExceeded

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@hengfengli hengfengli added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@hengfengli hengfengli added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@hengfengli hengfengli added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@hengfengli hengfengli added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@hengfengli
Copy link
Contributor

@tbpg Tried a couple of times. Still failed due to the flaky storage tests.

@tbpg
Copy link
Contributor

tbpg commented Mar 26, 2020

Will you merge the latest changes? Looks like I don't have permission. We can merge and fix the storage issue separately.

@hengfengli hengfengli added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2020
@tbpg tbpg merged commit e79020b into GoogleCloudPlatform:master Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants