Skip to content
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

[Python][CI] AppVeyor CI is failing on test_fs.py::test_filesystem_is_functional_after_pickling #38431

Closed
AlenkaF opened this issue Oct 24, 2023 · 3 comments · Fixed by #38455

Comments

@AlenkaF
Copy link
Member

AlenkaF commented Oct 24, 2023

Describe the bug, including details regarding any error messages, version, and platform.

As seen on a PR:
https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/48347810

Currently our Appveyor CI seems to be failing on python/pyarrow/tests/test_fs.py::test_filesystem_is_functional_after_pickling with:

_ test_filesystem_is_functional_after_pickling[builtin_pickle-PyFileSystem(FSSpecHandler(s3fs.S3FileSystem()))] _
fs = <pyarrow._fs.PyFileSystem object at 0x000001753AB82860>
pathfn = <method-wrapper '__add__' of str object at 0x0000017539D21FC0>
pickle_module = <module 'pickle' from 'C:\\Miniconda38-x64\\envs\\arrow\\lib\\pickle.py'>
    def test_filesystem_is_functional_after_pickling(fs, pathfn, pickle_module):
        if fs.type_name.split('::')[-1] == 'mock':
            pytest.xfail(reason='MockFileSystem is not serializable')
        skip_fsspec_s3fs(fs)
    
        aaa = pathfn('a/aa/aaa/')
        bb = pathfn('a/bb')
        c = pathfn('c.txt')
    
        fs.create_dir(aaa)
        with fs.open_output_stream(bb):
            pass  # touch
        with fs.open_output_stream(c) as fp:
            fp.write(b'test')
    
        restored = pickle_module.loads(pickle_module.dumps(fs))
        aaa_info, bb_info, c_info = restored.get_file_info([aaa, bb, c])
>       assert aaa_info.type == FileType.Directory
E       AssertionError: assert <FileType.NotFound: 0> == <FileType.Directory: 3>
E        +  where <FileType.NotFound: 0> = <FileInfo for 'pyarrow-filesystem/a/aa/aaa/': type=FileType.NotFound>.type
E        +  and   <FileType.Directory: 3> = FileType.Directory
pyarrow\tests\test_fs.py:588: AssertionError
.
.
.

Component(s)

Continuous Integration

@AlenkaF
Copy link
Member Author

AlenkaF commented Oct 24, 2023

The version of s3fs in the failing builds is 2023.10.0, in the last passing AppVeyor build the version has been 2023.9.2. Will look at the release notes and open issues in s3fs.

@AlenkaF
Copy link
Member Author

AlenkaF commented Oct 25, 2023

I think the failures are due to a type_name change connected to https://github.com/fsspec/s3fs/pull/812/files. Because the type_name changed from "py::fsspec+s3" to "py::fsspec+('s3', 's3a')" the skip doesn't work:

def skip_fsspec_s3fs(fs):
if fs.type_name == "py::fsspec+s3":
pytest.xfail(reason="Not working with fsspec's s3fs")

Will add a PR and see if this is it.

@bdice
Copy link

bdice commented Oct 25, 2023

Thanks for reporting @AlenkaF. I just ran into the same issue here while backporting a patch to PyArrow 13.0.0 on conda-forge: conda-forge/arrow-cpp-feedstock#1211 (comment)

kou pushed a commit that referenced this issue Oct 26, 2023
)

### Rationale for this change

Appveyor CI is failing https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/48347810. It seems the reason for the test failures is a change in the `type_name` (from `"py::fsspec+s3"` to `"py::fsspec+('s3', 's3a')"`) and due to it tests are not being skipped.

### What changes are included in this PR?

Update the check for `type_name` in case of `PyFileSystem(FSSpecHandler(s3fs.S3FileSystem()))`.
* Closes: #38431

Authored-by: AlenkaF <frim.alenka@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou changed the title [Python][CI] Appveyor CI is failing on test_fs.py::test_filesystem_is_functional_after_pickling [Python][CI] AppVeyor CI is failing on test_fs.py::test_filesystem_is_functional_after_pickling Oct 26, 2023
@kou kou added this to the 15.0.0 milestone Oct 26, 2023
@raulcd raulcd modified the milestones: 15.0.0, 14.0.1 Nov 6, 2023
raulcd pushed a commit that referenced this issue Nov 6, 2023
)

### Rationale for this change

Appveyor CI is failing https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/48347810. It seems the reason for the test failures is a change in the `type_name` (from `"py::fsspec+s3"` to `"py::fsspec+('s3', 's3a')"`) and due to it tests are not being skipped.

### What changes are included in this PR?

Update the check for `type_name` in case of `PyFileSystem(FSSpecHandler(s3fs.S3FileSystem()))`.
* Closes: #38431

Authored-by: AlenkaF <frim.alenka@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this issue Nov 13, 2023
apache#38455)

### Rationale for this change

Appveyor CI is failing https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/48347810. It seems the reason for the test failures is a change in the `type_name` (from `"py::fsspec+s3"` to `"py::fsspec+('s3', 's3a')"`) and due to it tests are not being skipped.

### What changes are included in this PR?

Update the check for `type_name` in case of `PyFileSystem(FSSpecHandler(s3fs.S3FileSystem()))`.
* Closes: apache#38431

Authored-by: AlenkaF <frim.alenka@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
apache#38455)

### Rationale for this change

Appveyor CI is failing https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/48347810. It seems the reason for the test failures is a change in the `type_name` (from `"py::fsspec+s3"` to `"py::fsspec+('s3', 's3a')"`) and due to it tests are not being skipped.

### What changes are included in this PR?

Update the check for `type_name` in case of `PyFileSystem(FSSpecHandler(s3fs.S3FileSystem()))`.
* Closes: apache#38431

Authored-by: AlenkaF <frim.alenka@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants