googleapis / python-aiplatform

A Python SDK for Vertex AI, a fully managed, end-to-end platform for data science and machine learning.
Apache License 2.0
589 stars 318 forks source link

tests.unit.vertexai.test_serializers.TestCloudPickleSerializer: test_deserialize_func_path_start_with_gcs failed #2752

Closed flaky-bot[bot] closed 9 months ago

flaky-bot[bot] commented 9 months ago

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and I will stop commenting.


commit: 8db915636bb7c7cb6a258a60c07b1b68275f3094 buildURL: Build Status, Sponge status: failed

Test output
self = 
cloudpickle_serializer = 

    def test_deserialize_func_path_start_with_gcs(self, cloudpickle_serializer):
        # Arrange
        fake_gcs_uri = "/gcs/staging-bucket/fake_gcs_uri.cpkl"

        def test_function():
            return "return_str"

        with fake_filesystem_unittest.Patcher() as filesystem:
>           filesystem.fs.create_file(fake_gcs_uri)

tests/unit/vertexai/test_serializers.py:1050: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.nox/unit-3-10/lib/python3.10/site-packages/pyfakefs/fake_filesystem.py:2126: in create_file
    return self.create_file_internally(
.nox/unit-3-10/lib/python3.10/site-packages/pyfakefs/fake_filesystem.py:2366: in create_file_internally
    self.raise_os_error(errno.EEXIST, path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = 
err_no = 17, filename = '/gcs/staging-bucket/fake_gcs_uri.cpkl', winerror = None

    def raise_os_error(
        self,
        err_no: int,
        filename: Optional[AnyString] = None,
        winerror: Optional[int] = None,
    ) -> NoReturn:
        """Raises OSError.
        The error message is constructed from the given error code and shall
        start with the error string issued in the real system.
        Note: this is not true under Windows if winerror is given - in this
        case a localized message specific to winerror will be shown in the
        real file system.

        Args:
            err_no: A numeric error code from the C variable errno.
            filename: The name of the affected file, if any.
            winerror: Windows only - the specific Windows error code.
        """
        message = os.strerror(err_no) + " in the fake filesystem"
        if winerror is not None and sys.platform == "win32" and self.is_windows_fs:
            raise OSError(err_no, message, filename, winerror)
>       raise OSError(err_no, message, filename)
E       FileExistsError: [Errno 17] File exists in the fake filesystem: '/gcs/staging-bucket/fake_gcs_uri.cpkl'

.nox/unit-3-10/lib/python3.10/site-packages/pyfakefs/fake_filesystem.py:428: FileExistsError
flaky-bot[bot] commented 9 months ago

Test passed for commit 9fedd34d004a60c7105c066085a296bc12b28138 (Build Status, Sponge)! Closing this issue.

flaky-bot[bot] commented 9 months ago

Test passed for commit 9fedd34d004a60c7105c066085a296bc12b28138 (Build Status, Sponge)! Closing this issue.

flaky-bot[bot] commented 9 months ago

Test passed for commit 9fedd34d004a60c7105c066085a296bc12b28138 (Build Status, Sponge)! Closing this issue.

flaky-bot[bot] commented 9 months ago

Test passed for commit 9fedd34d004a60c7105c066085a296bc12b28138 (Build Status, Sponge)! Closing this issue.