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

fix: remove delete of instance if it already exists, as it might be in use by another test #641

Merged
merged 2 commits into from May 31, 2021

Conversation

vi3k6i5
Copy link
Contributor

@vi3k6i5 vi3k6i5 commented May 26, 2021

fix: remove delete of instance if it already exists, as it might be in use by another test
Also include WORKER_INDEX in instance name to reduce chance of clash across workers.

@vi3k6i5 vi3k6i5 requested a review from a team as a code owner May 26, 2021 15:22
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner-django API. label May 26, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 26, 2021
@@ -14,6 +14,8 @@
from google.cloud.spanner_v1 import Client

REGION = "regional-us-central1"
WORKER_INDEX = int(os.getenv("DJANGO_WORKER_INDEX", 0))

Choose a reason for hiding this comment

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

I think you could use a UUID here to (practically) guarantee no clashes will happen.

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 googleapis/python-spanner-django API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants