GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Avoid sharing database name between testcase classes. by tseaver · Pull Request #4285 · googleapis/google-cloud-python

Conversation

@tseaver

@tseaver tseaver commented Oct 30, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Abrupt shutdown (maybe CircleCI auto-cancellation?) can cause them not to be cleaned up.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tseaver tseaver added api: spanner Issues related to the Spanner API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. testing labels Oct 30, 2017
@tseaver
tseaver requested a review from dhermes October 30, 2017 22:39
@tseaver
tseaver requested a review from lukesneeringer as a code owner October 30, 2017 22:39
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 30, 2017
@dhermes

dhermes commented Oct 30, 2017

Copy link
Copy Markdown
Contributor

This tries to address some recent failures:

  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3935
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3929
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3923
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3911
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3898
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3891
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3887
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3884
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3880
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3877

@tseaver Has also "cleaned" up recent sessions by hand.

I also pushed this branch to the GoogleCloudPlatform remote so we can see the system tests build go green.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Oct 30, 2017

Copy link
Copy Markdown
Contributor

@tseaver These tests end up with a 409 Conflict. We'll pick this back up tomorrow?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Oct 31, 2017

Copy link
Copy Markdown
Contributor

Based on the success of

  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3952
  • https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3953

it's clear that

  • the failures were caused by a failed clean-up of old tests
  • this fix is still insufficient, since the 409 was caused when this build ran at the same time as another
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Oct 31, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

The "obvious" fix would be to use a per-CI-run instance (using our normal unique_resource_id() helper, which is what we did prior to #3951. However, the Spanner folks throttle us at a maximum of 3 instances, and we have to keep one (gcp-streaming-systests) around, pre-populated. That means that even if we mangle the instance name, and never screw up the cleanup, we can have at most two CI runs happening at one time.

We could try mangling the database names, rather than the instance name: it is possible that we wouldn't hit a different quota limit for databases-within-an-instance.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Oct 31, 2017

Copy link
Copy Markdown
Contributor

@tseaver Could we check if it exists before using it in a class setup, then sleep (or fail the test) if it already exists?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Oct 31, 2017

Copy link
Copy Markdown
Contributor Author

@lukesneeringer Or we could ask again to get our quota raised: they acted like it was impossible back before I capitulated and put in #3951.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Oct 31, 2017

Copy link
Copy Markdown
Contributor Author

@dhermes We really don't want to share the database between test runs: they could step on each other in lots of ways beyond the creation bit.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Oct 31, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@dhermes https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/3964 is the run which will actually exercise the system tests from 2a66746.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Oct 31, 2017

Copy link
Copy Markdown
Contributor

We really don't want to share the database between test runs: they could step on each other in lots of ways beyond the creation bit.

I wasn't suggesting we do. I was suggesting we either

  • wait until the class knows it has created the database
  • give up if the database already exists (would need to use unittest.TestCase.skipTest at run time vs. unittest.skipIf at import time)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Oct 31, 2017

Copy link
Copy Markdown
Contributor

@tseaver You should rebase this PR so that your "Declare target packages (changed packages and dependencies)." doesn't end up with packages you don't care about.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver added 2 commits November 1, 2017 14:05
@tseaver
Avoid sharing database name between testcase classes.
af9bb7e
Abrupt shutdown (maybe CircleCI auto-cancellation?) can cause them not to be cleaned up.
@tseaver
Mangle database name w/ 'unique_resource_id'.
1fcdcc4
This time for sure, Rocky!
@tseaver

tseaver commented Nov 1, 2017

Copy link
Copy Markdown
Contributor Author

I'm not sure I get why the rebase, but I've done it blindly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Nov 1, 2017

Copy link
Copy Markdown
Contributor

@tseaver If you'd like to understand how "Declare Target Packages" works:

  • https://github.com/GoogleCloudPlatform/google-cloud-python/blob/185c585bcbaaf307e2ef62c265eda49c41808b4f/.circleci/config.yml#L38-L42
  • https://github.com/GoogleCloudPlatform/google-cloud-python/blob/185c585bcbaaf307e2ef62c265eda49c41808b4f/test_utils/scripts/get_target_packages.py

In particular, get_target_packages.py does a somewhat naive diff against master. So if your branch is behind master, you end up with a diff against HEAD vs. your merge base (this is actually the "right" idea). The files in the diff determine which packages get tested.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Nov 6, 2017

Copy link
Copy Markdown
Contributor Author

The Appveyor varioure is the same (bogus) "invalid version number" error. Any other reason not to merge this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Nov 6, 2017

Copy link
Copy Markdown
Contributor

@tseaver If you rebase from master, it'll go away (I fixed in #4313).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Nov 6, 2017

Copy link
Copy Markdown
Contributor

But go ahead and merge, no need to re-run tests.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver
tseaver merged commit 1844684 into googleapis:master Nov 6, 2017
@tseaver
tseaver deleted the spanner-fix-system-tests-borked branch November 6, 2017 16:07
chemelnucfin pushed a commit to chemelnucfin/google-cloud-python that referenced this pull request Nov 6, 2017
@tseaver @chemelnucfin
Avoid sharing database name between testcase classes. (googleapis#4285)
af35095
Abrupt shutdown (maybe CircleCI auto-cancellation?) can cause them not to be cleaned up.
chemelnucfin pushed a commit to chemelnucfin/google-cloud-python that referenced this pull request Nov 6, 2017
@tseaver @chemelnucfin
Avoid sharing database name between testcase classes. (googleapis#4285)
a917db3
Abrupt shutdown (maybe CircleCI auto-cancellation?) can cause them not to be cleaned up.
parthea pushed a commit that referenced this pull request Mar 9, 2026
@tseaver
Avoid sharing database name between testcase classes. (#4285)
6c94680
Abrupt shutdown (maybe CircleCI auto-cancellation?) can cause them not to be cleaned up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dhermes dhermes Awaiting requested review from dhermes
@lukesneeringer lukesneeringer Awaiting requested review from lukesneeringer

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: spanner Issues related to the Spanner API. cla: yes This human has signed the Contributor License Agreement. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. testing

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@tseaver @dhermes @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.