This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch release-2.61.0
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/release-2.61.0 by this push:
new e3948fa212e Use random gcs bucket name (#33151) (#33158)
e3948fa212e is described below
commit e3948fa212eca16737e1cff77a3f3d90ccb1297d
Author: Danny McCormick <[email protected]>
AuthorDate: Mon Nov 18 15:12:12 2024 -0500
Use random gcs bucket name (#33151) (#33158)
* Use random gcs bucket name
* Linter fixes
---------
Co-authored-by: claudevdm <[email protected]>
Co-authored-by: Claude <[email protected]>
---
sdks/python/apache_beam/ml/transforms/base_test.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/ml/transforms/base_test.py
b/sdks/python/apache_beam/ml/transforms/base_test.py
index df5bf826742..1a21f6caf7e 100644
--- a/sdks/python/apache_beam/ml/transforms/base_test.py
+++ b/sdks/python/apache_beam/ml/transforms/base_test.py
@@ -17,8 +17,10 @@
# pytype: skip-file
import os
+import secrets
import shutil
import tempfile
+import time
import typing
import unittest
from collections.abc import Sequence
@@ -699,7 +701,7 @@ class
TestJsonPickleTransformAttributeManager(unittest.TestCase):
@unittest.skipIf(apiclient is None, 'apache_beam[gcp] is not installed.')
def test_with_gcs_location_with_none_options(self):
- path = 'gs://fake_path'
+ path = f"gs://fake_path_{secrets.token_hex(3)}_{int(time.time())}"
with self.assertRaises(RuntimeError):
self.attribute_manager.save_attributes(
ptransform_list=[], artifact_location=path, options=None)