aIbrahiim commented on code in PR #36786:
URL: https://github.com/apache/beam/pull/36786#discussion_r2515360206
##########
sdks/python/apache_beam/io/gcp/gcsio_integration_test.py:
##########
@@ -242,7 +242,12 @@ def test_create_default_bucket(self,
mock_default_gcs_bucket_name):
# verify soft delete policy is disabled by default in the default bucket
# after creation
self.assertEqual(bucket.soft_delete_policy.retention_duration_seconds, 0)
- bucket.delete()
Review Comment:
Ahh absolutely right, then this masks the issue as I wasn't aware that the
test should fail if bucket doesnt exists but when i was investigating the test
class i found out that:
get_or_create_default_gcs_bucket() creates/gets bucket by create_bucket()
then wait 60 seconds for propagation
then it asserts the bucket exists using the object returned from creation
after that it make a fresh call by get_bucket() to lookup_bucket() which
may hit a different gcs endpoint or cache layer
even after the 60 seconds wait lookup_bucket() might not immediately see the
newly created bucket maybe because
different api endpoints create_bucket or lookup_bucket having different
cache states or gcs eventual consistency across regions or even caches, also
does create_bucket() and lookup_bucket() may hit different gcs endpoints or
caches?
and it might be name collisions as multiple test runs using the same random
bucket names?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]