This is an automated email from the ASF dual-hosted git repository.

yhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 714badb821b Better naming and logging to investigate leaking bigtable 
resources (#29203)
714badb821b is described below

commit 714badb821b7acfb9801a69dd0aff08bc84f6b4f
Author: Yi Hu <ya...@google.com>
AuthorDate: Tue Oct 31 00:13:09 2023 -0400

    Better naming and logging to investigate leaking bigtable resources (#29203)
---
 sdks/python/apache_beam/io/gcp/bigtableio_it_test.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py 
b/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py
index f61e346cff9..6cdd0bbeecf 100644
--- a/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py
+++ b/sdks/python/apache_beam/io/gcp/bigtableio_it_test.py
@@ -96,7 +96,7 @@ class TestReadFromBigTableIT(unittest.TestCase):
       self.table.delete()
       self.instance.delete()
     except HttpError:
-      _LOGGER.debug(
+      _LOGGER.warning(
           "Failed to clean up table [%s] and instance [%s]",
           self.table.table_id,
           self.instance.instance_id)
@@ -160,8 +160,8 @@ class TestWriteToBigtableXlangIT(unittest.TestCase):
     cls.args = cls.test_pipeline.get_full_options_as_args()
     cls.expansion_service = ('localhost:%s' % os.environ.get('EXPANSION_PORT'))
 
-    instance_id = '%s-%s-%s' % (
-        cls.INSTANCE, str(int(time.time())), secrets.token_hex(3))
+    timestr = "".join(filter(str.isdigit, str(datetime.datetime.utcnow())))
+    instance_id = '%s-%s-%s' % (cls.INSTANCE, timestr, secrets.token_hex(3))
 
     cls.client = client.Client(admin=True, project=cls.project)
     # create cluster and instance
@@ -190,7 +190,7 @@ class TestWriteToBigtableXlangIT(unittest.TestCase):
       _LOGGER.info("Deleting table [%s]", self.table.table_id)
       self.table.delete()
     except HttpError:
-      _LOGGER.debug("Failed to clean up table [%s]", self.table.table_id)
+      _LOGGER.warning("Failed to clean up table [%s]", self.table.table_id)
 
   @classmethod
   def tearDownClass(cls):
@@ -198,7 +198,7 @@ class TestWriteToBigtableXlangIT(unittest.TestCase):
       _LOGGER.info("Deleting instance [%s]", cls.instance.instance_id)
       cls.instance.delete()
     except HttpError:
-      _LOGGER.debug(
+      _LOGGER.warning(
           "Failed to clean up instance [%s]", cls.instance.instance_id)
 
   def run_pipeline(self, rows):

Reply via email to