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 3.11 CI test failure with AzureBlobStore #807

Closed
rkingsbury opened this issue Jun 14, 2023 · 0 comments
Closed

python 3.11 CI test failure with AzureBlobStore #807

rkingsbury opened this issue Jun 14, 2023 · 0 comments
Labels

Comments

@rkingsbury
Copy link
Collaborator

Since adding python 3.11 support (See #737 ), tests.stores.azure.test_multi_update frequently (but not always) fails using python 3.11. See this example workflow run.

I don't know the exact cause, but the issue is that the test condition is based on the execution time, with the assumption that a multiprocessed write will be faster than a single write:

        start = time.time()
        blobstore_multi.update(data, key=["task_id"])
        end = time.time()
        time_multi = end - start
    
        start = time.time()
        blobstore_two_docs.update(data, key=["task_id"])
        end = time.time()
        time_single = end - start
>       assert time_single > time_multi * (blobstore_multi.workers - 1) / (
            blobstore_two_docs.workers
        )
E       assert 0.26502466201782227 > ((0.5272753238677979 * (4 - 1)) / 4)
E        +  where 4 = <maggma.stores.azure.AzureBlobStore object at 0x7f0c5daa4810>.workers
E        +  and   4 = <maggma.stores.azure.AzureBlobStore object at 0x7f0c5daa4810>.workers

For whatever reason, in python 3.11 it seems that at least sometimes the single write is faster. I'm not sure whether this is due to a change from python 3.10 to 3.11, or some issue with GitHub python 3.11 workers, but regardless, I wonder @gpetretto if there is a different way you could write the assert statements that would test the functionality without being dependent on performance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant