Skip to content

test: harden pytest fixture setup stage #1323

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

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented Jul 8, 2024

Fixes #1316
Fixes #1315
Fixes #1314
Fixes #1312
Fixes #1310
Fixes #1300

@cojenco cojenco requested review from a team as code owners July 8, 2024 22:36
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: storage Issues related to the googleapis/python-storage API. labels Jul 8, 2024
@cojenco cojenco added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 8, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 8, 2024
@cojenco cojenco merged commit ed7cbba into googleapis:main Jul 9, 2024
15 checks passed
@@ -104,7 +105,11 @@ def shared_bucket_name():
def shared_bucket(storage_client, shared_bucket_name):
bucket = storage_client.bucket(shared_bucket_name)
bucket.versioning_enabled = True
_helpers.retry_429_503(bucket.create)()
# Create the bucket only if it doesn't yet exist.
Copy link
Contributor

Choose a reason for hiding this comment

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

Under what circumstances would the bucket already exist? Do we know?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The flaky test logs returned a 409 conflict error where a fixture bucket already existed. I'm guessing a server connection reset may have happened midway, causing the pytest fixture to rerun, and hence hitting the conflict error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment