Skip to content

CI: Unreliable Tests write to S3 #39155

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

Closed
alimcmaster1 opened this issue Jan 13, 2021 · 6 comments
Closed

CI: Unreliable Tests write to S3 #39155

alimcmaster1 opened this issue Jan 13, 2021 · 6 comments
Labels
Dependencies Required and optional dependencies IO Network Local or Cloud (AWS, GCS, etc.) IO Issues Testing pandas testing functions or related to the test suite

Comments

@alimcmaster1
Copy link
Member

Seen this in a few PRs:

https://github.com/pandas-dev/pandas/pull/39153/checks?check_run_id=1697646268

________________________ TestS3.test_write_s3_csv_fails ________________________
[gw1] linux -- Python 3.7.9 /usr/share/miniconda/envs/pandas-dev/bin/python

self = <pandas.tests.io.parser.test_network.TestS3 object at 0x7feea42e2610>
tips_df =      total_bill   tip     sex smoker   day    time  size
0         16.99  1.01  Female     No   Sun  Dinner     2
1   ....75    Male     No   Sat  Dinner     2
243       18.78  3.00  Female     No  Thur  Dinner     2

[244 rows x 7 columns]
s3so = {'client_kwargs': {'endpoint_url': 'http://127.0.0.1:5551/'}}

    def test_write_s3_csv_fails(self, tips_df, s3so):
        # GH 32486
        # Attempting to write to an invalid S3 path should raise
        import botocore
    
        # GH 34087
        # https://boto3.amazonaws.com/v1/documentation/api/latest/guide/error-handling.html
        # Catch a ClientError since AWS Service Errors are defined dynamically
        error = (FileNotFoundError, botocore.exceptions.ClientError)
    
        with pytest.raises(error, match="The specified bucket does not exist"):
            tips_df.to_csv(
>               "s3://an_s3_bucket_data_doesnt_exit/not_real.csv", storage_options=s3so
            )
E           Failed: DID NOT RAISE (<class 'FileNotFoundError'>, <class 'botocore.exceptions.ClientError'>)

pandas/tests/io/parser/test_network.py:224: Failed
______________________ TestS3.test_write_s3_parquet_fails ______________________
[gw1] linux -- Python 3.7.9 /usr/share/miniconda/envs/pandas-dev/bin/python

self = <pandas.tests.io.parser.test_network.TestS3 object at 0x7feea435c790>
tips_df =      total_bill   tip     sex smoker   day    time  size
0         16.99  1.01  Female     No   Sun  Dinner     2
1   ....75    Male     No   Sat  Dinner     2
243       18.78  3.00  Female     No  Thur  Dinner     2

[244 rows x 7 columns]
s3so = {'client_kwargs': {'endpoint_url': 'http://127.0.0.1:5551/'}}

    @td.skip_if_no("pyarrow")
    def test_write_s3_parquet_fails(self, tips_df, s3so):
        # GH 27679
        # Attempting to write to an invalid S3 path should raise
        import botocore
    
        # GH 34087
        # https://boto3.amazonaws.com/v1/documentation/api/latest/guide/error-handling.html
        # Catch a ClientError since AWS Service Errors are defined dynamically
        error = (FileNotFoundError, botocore.exceptions.ClientError)
    
        with pytest.raises(error, match="The specified bucket does not exist"):
            tips_df.to_parquet(
                "s3://an_s3_bucket_data_doesnt_exit/not_real.parquet",
>               storage_options=s3so,
            )
E           Failed: DID NOT RAISE (<class 'FileNotFoundError'>, <class 'botocore.exceptions.ClientError'>)

@alimcmaster1 alimcmaster1 added Bug Needs Triage Issue that has not been reviewed by a pandas team member Unreliable Test Unit tests that occasionally fail IO Network Local or Cloud (AWS, GCS, etc.) IO Issues Testing pandas testing functions or related to the test suite and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 13, 2021
@phofl
Copy link
Member

phofl commented Jan 13, 2021

The test is failing since s3fs got upgraded to 0.5.2 in our pipelines. On master this was first the case for 396131a. The commits before that had 0.4.2. I don't know why this happend yesterday since the packages seems to be up on conda forge for a month (https://anaconda.org/conda-forge/s3fs/files) but installing a new environment and downgrading s3fs to 0.4.2 locally causes the test to pass while it fails with 0.5.2

@phofl
Copy link
Member

phofl commented Jan 13, 2021

I am removing unreliable test, since this is a dependency issue

@phofl phofl added Dependencies Required and optional dependencies and removed Unreliable Test Unit tests that occasionally fail labels Jan 13, 2021
@phofl
Copy link
Member

phofl commented Jan 15, 2021

We are somehow pulling s3fs=0.4.2 again, so tests are passing now, meaning xfail causes bugs.

@jbrockmendel
Copy link
Member

is there a relevant issue on the s3fs tracker?

@jbrockmendel
Copy link
Member

@martindurant looks like you did a lot of work on these tests. any idea how to fix them now?

@mroeschke
Copy link
Member

I think these have been fixed by running these tests in single cpu builds so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Required and optional dependencies IO Network Local or Cloud (AWS, GCS, etc.) IO Issues Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

4 participants